comparison libinterp/corefcn/load-path.cc @ 30346:91c6288781ba

maint: Shorten some long lines in libinterp to <= 80 characters (bug #57599) * __isprimelarge__.cc, bsxfun.cc, cellfun.cc, chol.cc, data.cc, error.h, event-manager.h, filter.cc, find.cc, gcd.cc, gl-render.h, gl2ps-print.cc, graphics.cc, graphics.in.h, hash.cc, help.cc, hex2num.cc, input.cc, inv.cc, load-path.cc, load-save.cc, ls-hdf5.cc, ls-hdf5.h, ls-mat5.cc, lu.cc, mappers.cc, matrix_type.cc, max.cc, mex.cc, mxarray.h, oct-errno.in.cc, oct-map.cc, oct-stream.cc, oct-stream.h, pr-output.cc, psi.cc, qr.cc, rand.cc, regexp.cc, sparse-xdiv.h, stack-frame.cc, strfind.cc, strfns.cc, sylvester.cc, symbfact.cc, symrec.h, symscope.cc, typecast.cc, utils.cc, variables.h, xdiv.h, xpow.h, __init_fltk__.cc, __ode15__.cc, audiodevinfo.cc, audioread.cc, convhulln.cc, cdef-class.cc, cdef-class.h, cdef-manager.cc, cdef-method.cc, cdef-object.cc, cdef-object.h, cdef-package.h, cdef-utils.cc, ov-base-diag.cc, ov-base-int.cc, ov-base.h, ov-bool-mat.cc, ov-bool.cc, ov-cell.cc, ov-ch-mat.cc, ov-class.cc, ov-class.h, ov-classdef.cc, ov-colon.h, ov-complex.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-dld-fcn.h, ov-fcn-handle.cc, ov-float.cc, ov-flt-complex.cc, ov-flt-cx-diag.cc, ov-flt-cx-mat.cc, ov-flt-re-diag.cc, ov-flt-re-mat.cc, ov-java.cc, ov-lazy-idx.cc, ov-lazy-idx.h, ov-range.cc, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-scalar.cc, ov-str-mat.cc, ov-struct.cc, ov-typeinfo.cc, ov.cc, ov.h, octave.h, bp-table.cc, bp-table.h, lex.h, oct-lvalue.h, profiler.cc, profiler.h, pt-binop.h, pt-colon.cc, pt-eval.cc, pt-exp.h, pt-select.h: Shorten some long lines in libinterp to <= 80 characters.
author Rik <rik@octave.org>
date Wed, 24 Nov 2021 09:38:51 -0800
parents 8f61866f0f6d
children 83f9f8bda883
comparison
equal deleted inserted replaced
30345:ba03a127bee1 30346:91c6288781ba
972 972
973 if (fs.exists ()) 973 if (fs.exists ())
974 source_file (file, "base"); 974 source_file (file, "base");
975 } 975 }
976 976
977 // FIXME: maybe we should also maintain a map to speed up this method of access. 977 // FIXME: maybe we should also maintain a map to speed up this method of
978 // access.
978 979
979 load_path::const_dir_info_list_iterator 980 load_path::const_dir_info_list_iterator
980 load_path::find_dir_info (const std::string& dir_arg) const 981 load_path::find_dir_info (const std::string& dir_arg) const
981 { 982 {
982 std::string dir = sys::file_ops::tilde_expand (dir_arg); 983 std::string dir = sys::file_ops::tilde_expand (dir_arg);
1743 dir_info::const_fcn_file_map_iterator p = fcn_file_map.find (fcn); 1744 dir_info::const_fcn_file_map_iterator p = fcn_file_map.find (fcn);
1744 1745
1745 if (p != fcn_file_map.end ()) 1746 if (p != fcn_file_map.end ())
1746 { 1747 {
1747 std::string fname 1748 std::string fname
1748 = sys::file_ops::concat (sys::file_ops::concat (dir, "private"), fcn); 1749 = sys::file_ops::concat (sys::file_ops::concat (dir, "private"),
1750 fcn);
1749 1751
1750 if (check_file_type (fname, type, p->second, fcn, 1752 if (check_file_type (fname, type, p->second, fcn,
1751 "load_path::find_private_fcn")) 1753 "load_path::find_private_fcn"))
1752 retval = fname; 1754 retval = fname;
1753 } 1755 }
1914 symbol_table& symtab 1916 symbol_table& symtab
1915 = __get_symbol_table__ ("load_path::package_info::add_to_fcn_map"); 1917 = __get_symbol_table__ ("load_path::package_info::add_to_fcn_map");
1916 1918
1917 if (symtab.is_built_in_function_name (base)) 1919 if (symtab.is_built_in_function_name (base))
1918 { 1920 {
1919 std::string fcn_path = sys::file_ops::concat (dir_name, fname); 1921 std::string fcn_path = sys::file_ops::concat (dir_name,
1922 fname);
1920 1923
1921 warning_with_id ("Octave:shadowed-function", 1924 warning_with_id ("Octave:shadowed-function",
1922 "function %s shadows a built-in function", 1925 "function %s shadows a built-in function",
1923 fcn_path.c_str ()); 1926 fcn_path.c_str ());
1924 } 1927 }
1936 1939
1937 if (fname != "Contents.m" 1940 if (fname != "Contents.m"
1938 && s_sys_path.find (old.dir_name) != std::string::npos 1941 && s_sys_path.find (old.dir_name) != std::string::npos
1939 && in_path_list (s_sys_path, old.dir_name)) 1942 && in_path_list (s_sys_path, old.dir_name))
1940 { 1943 {
1941 std::string fcn_path = sys::file_ops::concat (dir_name, fname); 1944 std::string fcn_path = sys::file_ops::concat (dir_name,
1945 fname);
1942 1946
1943 warning_with_id ("Octave:shadowed-function", 1947 warning_with_id ("Octave:shadowed-function",
1944 "function %s shadows a core library function", 1948 "function %s shadows a core library function",
1945 fcn_path.c_str ()); 1949 fcn_path.c_str ());
1946 } 1950 }
2036 } 2040 }
2037 } 2041 }
2038 2042
2039 void 2043 void
2040 load_path::package_info::move_fcn_map (const std::string& dir_name, 2044 load_path::package_info::move_fcn_map (const std::string& dir_name,
2041 const string_vector& fcn_files, bool at_end) 2045 const string_vector& fcn_files,
2046 bool at_end)
2042 { 2047 {
2043 octave_idx_type len = fcn_files.numel (); 2048 octave_idx_type len = fcn_files.numel ();
2044 2049
2045 for (octave_idx_type k = 0; k < len; k++) 2050 for (octave_idx_type k = 0; k < len; k++)
2046 { 2051 {
2390 std::string nm = sys::file_ops::concat (dirname, elt); 2395 std::string nm = sys::file_ops::concat (dirname, elt);
2391 2396
2392 sys::file_stat fs (nm); 2397 sys::file_stat fs (nm);
2393 2398
2394 if (fs && fs.is_dir ()) 2399 if (fs && fs.is_dir ())
2395 retval += directory_path::path_sep_str () + genpath (nm, skip); 2400 retval += (directory_path::path_sep_str ()
2401 + genpath (nm, skip));
2396 } 2402 }
2397 } 2403 }
2398 } 2404 }
2399 2405
2400 return retval; 2406 return retval;