Lines Matching defs:filename

62  * Remove quotes around a filename.
240 public char * dirfile(constant char *dirname, constant char *filename, int must_exist)
251 len = strlen(dirname) + strlen(filename) + 2;
255 SNPRINTF3(pathname, len, "%s%s%s", dirname, PATHNAME_SEP, filename);
277 public char * homefile(constant char *filename)
281 /* Try $HOME/filename. */
282 pathname = dirfile(lgetenv("HOME"), filename, 1);
286 /* Try $INIT/filename. */
287 pathname = dirfile(lgetenv("INIT"), filename, 1);
296 char *res = searchpath(filename);
303 _searchenv(filename, "PATH", pathname);
322 /* If filename contains spaces, quote it
376 * Expand a string, substituting any "%" with the current filename,
377 * and any "#" with the previous filename.
418 * Complete the filename "s" by globbing "s*".
423 * But if the final component of the filename already has
453 * The filename didn't expand.
596 * Expand a filename, doing any system-specific metacharacter substitutions.
601 char *filename = fexpand(afilename);
604 return (filename);
616 GLOB_LIST(filename, list);
619 return (filename);
663 GLOB_FIRST_NAME(filename, &fnd, handle);
666 return (filename);
669 _splitpath(filename, drive, dir, fname, ext);
713 * We get the shell to glob the filename for us by passing
730 return (filename);
738 len = strlen(lessecho) + strlen(filename) + (7*strlen(metachars())) + 24;
745 sprintf(cmd + strlen(cmd), "-- %s", filename);
752 * Just return the original (fexpanded) filename.
754 return (filename);
761 return (filename);
766 * No globbing functions at all. Just use the fexpanded filename.
768 gfilename = save(filename);
772 free(filename);
846 public char * open_altfile(constant char *filename, int *pf, void **pfd)
884 * Lessopen preprocessor will accept "-" as a filename.
889 if (strcmp(filename, "-") == 0)
898 qfilename = shell_quote(filename);
969 public void close_altfile(constant char *altfilename, constant char *filename)
988 qfilename = shell_quote(filename);
1005 public lbool is_dir(constant char *filename)
1014 r = less_stat(filename, &statbuf);
1022 f = open(filename, S_IREAD | S_IFDIR);
1037 public char * bad_file(constant char *filename)
1041 if (!force_open && is_dir(filename))
1045 m = (char *) ecalloc(strlen(filename) + sizeof(is_a_dir),
1047 strcpy(m, filename);
1055 r = less_stat(filename, &statbuf);
1058 m = errno_message(filename);
1065 m = (char *) ecalloc(strlen(filename) + sizeof(not_reg),
1067 strcpy(m, filename);