+ /* If FILENAME is absolute, return it unchanged. */
+ if (filename_len >= 1
+ && SCM_ROCHARS (filename)[0] == '/')
+ return filename;
+
+ /* Find the length of the longest element of path. */
+ {
+ SCM walk;
+
+ max_path_len = 0;
+ for (walk = path; SCM_NIMP (walk); walk = SCM_CDR (walk))
+ {
+ SCM elt = SCM_CAR (walk);
+ SCM_ASSERT (SCM_NIMP (elt) && SCM_ROSTRINGP (elt), elt,
+ "load path is not a list of strings",
+ s_sys_search_load_path);
+ if (SCM_LENGTH (elt) > max_path_len)
+ max_path_len = SCM_LENGTH (elt);
+ }
+ }
+
+ /* Find the length of the longest element of the load extensions
+ list. */
+ {
+ SCM walk;
+
+ max_ext_len = 0;
+ for (walk = exts; SCM_NIMP (walk); walk = SCM_CDR (walk))
+ {
+ SCM elt = SCM_CAR (walk);
+ SCM_ASSERT (SCM_NIMP (elt) && SCM_ROSTRINGP (elt), elt,
+ "load extension list is not a list of strings",
+ s_sys_search_load_path);
+ if (SCM_LENGTH (elt) > max_ext_len)
+ max_ext_len = SCM_LENGTH (elt);
+ }
+ }
+