comparison src/load-path.cc @ 11586:12df7854fa7c

strip trailing whitespace from source files
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 17:24:59 -0500
parents 06cfda4c07e5
children ab4c6bbff14a
comparison
equal deleted inserted replaced
11585:1473d0cf86d2 11586:12df7854fa7c
939 } 939 }
940 else 940 else
941 error ("%s: %s: invalid type code = %d", who, fcn.c_str (), type); 941 error ("%s: %s: invalid type code = %d", who, fcn.c_str (), type);
942 942
943 return retval; 943 return retval;
944 } 944 }
945 945
946 std::string 946 std::string
947 load_path::do_find_fcn (const std::string& fcn, std::string& dir_name, 947 load_path::do_find_fcn (const std::string& fcn, std::string& dir_name,
948 int type) const 948 int type) const
949 { 949 {
950 std::string retval; 950 std::string retval;
951 951
952 // update (); 952 // update ();
953 953
954 if (fcn.length () > 0 && fcn[0] == '@') 954 if (fcn.length () > 0 && fcn[0] == '@')
955 { 955 {
956 size_t pos = fcn.find ('/'); 956 size_t pos = fcn.find ('/');
1765 && in_path_list (sys_path, old.dir_name)) 1765 && in_path_list (sys_path, old.dir_name))
1766 { 1766 {
1767 std::string fcn_path = file_ops::concat (dir_name, fname); 1767 std::string fcn_path = file_ops::concat (dir_name, fname);
1768 1768
1769 warning_with_id ("Octave:shadowed-function", 1769 warning_with_id ("Octave:shadowed-function",
1770 "function %s shadows a core library function", 1770 "function %s shadows a core library function",
1771 fcn_path.c_str ()); 1771 fcn_path.c_str ());
1772 } 1772 }
1773 } 1773 }
1774 else if (symbol_table::is_built_in_function_name (base)) 1774 else if (symbol_table::is_built_in_function_name (base))
1775 { 1775 {
1776 std::string fcn_path = file_ops::concat (dir_name, fname); 1776 std::string fcn_path = file_ops::concat (dir_name, fname);
1777 warning_with_id ("Octave:shadowed-function", 1777 warning_with_id ("Octave:shadowed-function",
1778 "function %s shadows a built-in function", 1778 "function %s shadows a built-in function",
1779 fcn_path.c_str ()); 1779 fcn_path.c_str ());
1780 } 1780 }
1781 1781
1782 file_info_list.push_front (fi); 1782 file_info_list.push_front (fi);
1783 } 1783 }
1881 if (dir) 1881 if (dir)
1882 { 1882 {
1883 retval = dirname; 1883 retval = dirname;
1884 1884
1885 string_vector dirlist = dir.read (); 1885 string_vector dirlist = dir.read ();
1886 1886
1887 octave_idx_type len = dirlist.length (); 1887 octave_idx_type len = dirlist.length ();
1888 1888
1889 for (octave_idx_type i = 0; i < len; i++) 1889 for (octave_idx_type i = 0; i < len; i++)
1890 { 1890 {
1891 std::string elt = dirlist[i]; 1891 std::string elt = dirlist[i];