338 |
/* This function must not munge the match data. */ |
/* This function must not munge the match data. */ |
339 |
Lisp_Object chain, inhibited_handlers; |
Lisp_Object chain, inhibited_handlers; |
340 |
|
|
341 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
342 |
|
|
343 |
if (EQ (operation, Vinhibit_file_name_operation)) |
if (EQ (operation, Vinhibit_file_name_operation)) |
344 |
inhibited_handlers = Vinhibit_file_name_handlers; |
inhibited_handlers = Vinhibit_file_name_handlers; |
384 |
register unsigned char *p; |
register unsigned char *p; |
385 |
Lisp_Object handler; |
Lisp_Object handler; |
386 |
|
|
387 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
388 |
|
|
389 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
390 |
call the corresponding file handler. */ |
call the corresponding file handler. */ |
459 |
register unsigned char *beg, *p, *end; |
register unsigned char *beg, *p, *end; |
460 |
Lisp_Object handler; |
Lisp_Object handler; |
461 |
|
|
462 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
463 |
|
|
464 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
465 |
call the corresponding file handler. */ |
call the corresponding file handler. */ |
614 |
char *buf; |
char *buf; |
615 |
Lisp_Object handler; |
Lisp_Object handler; |
616 |
|
|
617 |
CHECK_STRING (file, 0); |
CHECK_STRING (file); |
618 |
if (NILP (file)) |
if (NILP (file)) |
619 |
return Qnil; |
return Qnil; |
620 |
|
|
805 |
char *buf; |
char *buf; |
806 |
Lisp_Object handler; |
Lisp_Object handler; |
807 |
|
|
808 |
CHECK_STRING (directory, 0); |
CHECK_STRING (directory); |
809 |
|
|
810 |
if (NILP (directory)) |
if (NILP (directory)) |
811 |
return Qnil; |
return Qnil; |
870 |
char pidbuf[20]; |
char pidbuf[20]; |
871 |
int pidlen; |
int pidlen; |
872 |
|
|
873 |
CHECK_STRING (prefix, 0); |
CHECK_STRING (prefix); |
874 |
|
|
875 |
/* VAL is created by adding 6 characters to PREFIX. The first |
/* VAL is created by adding 6 characters to PREFIX. The first |
876 |
three are the PID of this process, in base 64, and the second |
three are the PID of this process, in base 64, and the second |
1019 |
int length; |
int length; |
1020 |
Lisp_Object handler; |
Lisp_Object handler; |
1021 |
|
|
1022 |
CHECK_STRING (name, 0); |
CHECK_STRING (name); |
1023 |
|
|
1024 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
1025 |
call the corresponding file handler. */ |
call the corresponding file handler. */ |
1686 |
int dots = 0; |
int dots = 0; |
1687 |
#endif /* VMS */ |
#endif /* VMS */ |
1688 |
|
|
1689 |
CHECK_STRING (name, 0); |
CHECK_STRING (name); |
1690 |
|
|
1691 |
#ifdef VMS |
#ifdef VMS |
1692 |
/* Filenames on VMS are always upper case. */ |
/* Filenames on VMS are always upper case. */ |
1862 |
{ |
{ |
1863 |
if (NILP (defalt)) |
if (NILP (defalt)) |
1864 |
defalt = current_buffer->directory; |
defalt = current_buffer->directory; |
1865 |
CHECK_STRING (defalt, 1); |
CHECK_STRING (defalt); |
1866 |
newdir = XSTRING (defalt)->data; |
newdir = XSTRING (defalt)->data; |
1867 |
} |
} |
1868 |
|
|
2004 |
unsigned char *xnm; |
unsigned char *xnm; |
2005 |
Lisp_Object handler; |
Lisp_Object handler; |
2006 |
|
|
2007 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
2008 |
|
|
2009 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
2010 |
call the corresponding file handler. */ |
call the corresponding file handler. */ |
2318 |
|
|
2319 |
encoded_file = encoded_newname = Qnil; |
encoded_file = encoded_newname = Qnil; |
2320 |
GCPRO4 (file, newname, encoded_file, encoded_newname); |
GCPRO4 (file, newname, encoded_file, encoded_newname); |
2321 |
CHECK_STRING (file, 0); |
CHECK_STRING (file); |
2322 |
CHECK_STRING (newname, 1); |
CHECK_STRING (newname); |
2323 |
|
|
2324 |
if (!NILP (Ffile_directory_p (newname))) |
if (!NILP (Ffile_directory_p (newname))) |
2325 |
newname = Fexpand_file_name (file, newname); |
newname = Fexpand_file_name (file, newname); |
2472 |
Lisp_Object handler; |
Lisp_Object handler; |
2473 |
Lisp_Object encoded_dir; |
Lisp_Object encoded_dir; |
2474 |
|
|
2475 |
CHECK_STRING (directory, 0); |
CHECK_STRING (directory); |
2476 |
directory = Fexpand_file_name (directory, Qnil); |
directory = Fexpand_file_name (directory, Qnil); |
2477 |
|
|
2478 |
handler = Ffind_file_name_handler (directory, Qmake_directory_internal); |
handler = Ffind_file_name_handler (directory, Qmake_directory_internal); |
2502 |
Lisp_Object handler; |
Lisp_Object handler; |
2503 |
Lisp_Object encoded_dir; |
Lisp_Object encoded_dir; |
2504 |
|
|
2505 |
CHECK_STRING (directory, 0); |
CHECK_STRING (directory); |
2506 |
directory = Fdirectory_file_name (Fexpand_file_name (directory, Qnil)); |
directory = Fdirectory_file_name (Fexpand_file_name (directory, Qnil)); |
2507 |
|
|
2508 |
handler = Ffind_file_name_handler (directory, Qdelete_directory); |
handler = Ffind_file_name_handler (directory, Qdelete_directory); |
2528 |
Lisp_Object handler; |
Lisp_Object handler; |
2529 |
Lisp_Object encoded_file; |
Lisp_Object encoded_file; |
2530 |
|
|
2531 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
2532 |
filename = Fexpand_file_name (filename, Qnil); |
filename = Fexpand_file_name (filename, Qnil); |
2533 |
|
|
2534 |
handler = Ffind_file_name_handler (filename, Qdelete_file); |
handler = Ffind_file_name_handler (filename, Qdelete_file); |
2579 |
|
|
2580 |
encoded_file = encoded_newname = Qnil; |
encoded_file = encoded_newname = Qnil; |
2581 |
GCPRO4 (file, newname, encoded_file, encoded_newname); |
GCPRO4 (file, newname, encoded_file, encoded_newname); |
2582 |
CHECK_STRING (file, 0); |
CHECK_STRING (file); |
2583 |
CHECK_STRING (newname, 1); |
CHECK_STRING (newname); |
2584 |
file = Fexpand_file_name (file, Qnil); |
file = Fexpand_file_name (file, Qnil); |
2585 |
newname = Fexpand_file_name (newname, Qnil); |
newname = Fexpand_file_name (newname, Qnil); |
2586 |
|
|
2655 |
|
|
2656 |
GCPRO4 (file, newname, encoded_file, encoded_newname); |
GCPRO4 (file, newname, encoded_file, encoded_newname); |
2657 |
encoded_file = encoded_newname = Qnil; |
encoded_file = encoded_newname = Qnil; |
2658 |
CHECK_STRING (file, 0); |
CHECK_STRING (file); |
2659 |
CHECK_STRING (newname, 1); |
CHECK_STRING (newname); |
2660 |
file = Fexpand_file_name (file, Qnil); |
file = Fexpand_file_name (file, Qnil); |
2661 |
newname = Fexpand_file_name (newname, Qnil); |
newname = Fexpand_file_name (newname, Qnil); |
2662 |
|
|
2718 |
|
|
2719 |
GCPRO4 (filename, linkname, encoded_filename, encoded_linkname); |
GCPRO4 (filename, linkname, encoded_filename, encoded_linkname); |
2720 |
encoded_filename = encoded_linkname = Qnil; |
encoded_filename = encoded_linkname = Qnil; |
2721 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
2722 |
CHECK_STRING (linkname, 1); |
CHECK_STRING (linkname); |
2723 |
/* If the link target has a ~, we must expand it to get |
/* If the link target has a ~, we must expand it to get |
2724 |
a truly valid file name. Otherwise, do not expand; |
a truly valid file name. Otherwise, do not expand; |
2725 |
we want to permit links to relative file names. */ |
we want to permit links to relative file names. */ |
2786 |
Lisp_Object name; |
Lisp_Object name; |
2787 |
Lisp_Object string; |
Lisp_Object string; |
2788 |
{ |
{ |
2789 |
CHECK_STRING (name, 0); |
CHECK_STRING (name); |
2790 |
if (NILP (string)) |
if (NILP (string)) |
2791 |
delete_logical_name (XSTRING (name)->data); |
delete_logical_name (XSTRING (name)->data); |
2792 |
else |
else |
2793 |
{ |
{ |
2794 |
CHECK_STRING (string, 1); |
CHECK_STRING (string); |
2795 |
|
|
2796 |
if (XSTRING (string)->size == 0) |
if (XSTRING (string)->size == 0) |
2797 |
delete_logical_name (XSTRING (name)->data); |
delete_logical_name (XSTRING (name)->data); |
2812 |
{ |
{ |
2813 |
int netresult; |
int netresult; |
2814 |
|
|
2815 |
CHECK_STRING (path, 0); |
CHECK_STRING (path); |
2816 |
CHECK_STRING (login, 0); |
CHECK_STRING (login); |
2817 |
|
|
2818 |
netresult = netunam (XSTRING (path)->data, XSTRING (login)->data); |
netresult = netunam (XSTRING (path)->data, XSTRING (login)->data); |
2819 |
|
|
2833 |
{ |
{ |
2834 |
unsigned char *ptr; |
unsigned char *ptr; |
2835 |
|
|
2836 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
2837 |
ptr = XSTRING (filename)->data; |
ptr = XSTRING (filename)->data; |
2838 |
if (IS_DIRECTORY_SEP (*ptr) || *ptr == '~' |
if (IS_DIRECTORY_SEP (*ptr) || *ptr == '~' |
2839 |
#ifdef VMS |
#ifdef VMS |
2920 |
Lisp_Object handler; |
Lisp_Object handler; |
2921 |
struct stat statbuf; |
struct stat statbuf; |
2922 |
|
|
2923 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
2924 |
absname = Fexpand_file_name (filename, Qnil); |
absname = Fexpand_file_name (filename, Qnil); |
2925 |
|
|
2926 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
2943 |
Lisp_Object absname; |
Lisp_Object absname; |
2944 |
Lisp_Object handler; |
Lisp_Object handler; |
2945 |
|
|
2946 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
2947 |
absname = Fexpand_file_name (filename, Qnil); |
absname = Fexpand_file_name (filename, Qnil); |
2948 |
|
|
2949 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
2969 |
int flags; |
int flags; |
2970 |
struct stat statbuf; |
struct stat statbuf; |
2971 |
|
|
2972 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
2973 |
absname = Fexpand_file_name (filename, Qnil); |
absname = Fexpand_file_name (filename, Qnil); |
2974 |
|
|
2975 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
3017 |
Lisp_Object handler; |
Lisp_Object handler; |
3018 |
struct stat statbuf; |
struct stat statbuf; |
3019 |
|
|
3020 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
3021 |
absname = Fexpand_file_name (filename, Qnil); |
absname = Fexpand_file_name (filename, Qnil); |
3022 |
|
|
3023 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
3065 |
Lisp_Object handler, encoded_filename, absname; |
Lisp_Object handler, encoded_filename, absname; |
3066 |
int fd; |
int fd; |
3067 |
|
|
3068 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
3069 |
absname = Fexpand_file_name (filename, Qnil); |
absname = Fexpand_file_name (filename, Qnil); |
3070 |
|
|
3071 |
CHECK_STRING (string, 1); |
CHECK_STRING (string); |
3072 |
|
|
3073 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
3074 |
call the corresponding file handler. */ |
call the corresponding file handler. */ |
3100 |
Lisp_Object val; |
Lisp_Object val; |
3101 |
Lisp_Object handler; |
Lisp_Object handler; |
3102 |
|
|
3103 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
3104 |
filename = Fexpand_file_name (filename, Qnil); |
filename = Fexpand_file_name (filename, Qnil); |
3105 |
|
|
3106 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
3287 |
Lisp_Object handler; |
Lisp_Object handler; |
3288 |
|
|
3289 |
absname = Fexpand_file_name (filename, current_buffer->directory); |
absname = Fexpand_file_name (filename, current_buffer->directory); |
3290 |
CHECK_NUMBER (mode, 1); |
CHECK_NUMBER (mode); |
3291 |
|
|
3292 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
3293 |
call the corresponding file handler. */ |
call the corresponding file handler. */ |
3310 |
(mode) |
(mode) |
3311 |
Lisp_Object mode; |
Lisp_Object mode; |
3312 |
{ |
{ |
3313 |
CHECK_NUMBER (mode, 0); |
CHECK_NUMBER (mode); |
3314 |
|
|
3315 |
umask ((~ XINT (mode)) & 0777); |
umask ((~ XINT (mode)) & 0777); |
3316 |
|
|
3361 |
Lisp_Object handler; |
Lisp_Object handler; |
3362 |
struct gcpro gcpro1, gcpro2; |
struct gcpro gcpro1, gcpro2; |
3363 |
|
|
3364 |
CHECK_STRING (file1, 0); |
CHECK_STRING (file1); |
3365 |
CHECK_STRING (file2, 0); |
CHECK_STRING (file2); |
3366 |
|
|
3367 |
absname1 = Qnil; |
absname1 = Qnil; |
3368 |
GCPRO2 (absname1, file2); |
GCPRO2 (absname1, file2); |
3542 |
|
|
3543 |
GCPRO4 (filename, val, p, orig_filename); |
GCPRO4 (filename, val, p, orig_filename); |
3544 |
|
|
3545 |
CHECK_STRING (filename, 0); |
CHECK_STRING (filename); |
3546 |
filename = Fexpand_file_name (filename, Qnil); |
filename = Fexpand_file_name (filename, Qnil); |
3547 |
|
|
3548 |
/* If the file name has special constructs in it, |
/* If the file name has special constructs in it, |
3636 |
} |
} |
3637 |
|
|
3638 |
if (!NILP (beg)) |
if (!NILP (beg)) |
3639 |
CHECK_NUMBER (beg, 0); |
CHECK_NUMBER (beg); |
3640 |
else |
else |
3641 |
XSETFASTINT (beg, 0); |
XSETFASTINT (beg, 0); |
3642 |
|
|
3643 |
if (!NILP (end)) |
if (!NILP (end)) |
3644 |
CHECK_NUMBER (end, 0); |
CHECK_NUMBER (end); |
3645 |
else |
else |
3646 |
{ |
{ |
3647 |
if (! not_regular) |
if (! not_regular) |
4458 |
|
|
4459 |
insval = call3 (Qformat_decode, |
insval = call3 (Qformat_decode, |
4460 |
Qnil, make_number (inserted), visit); |
Qnil, make_number (inserted), visit); |
4461 |
CHECK_NUMBER (insval, 0); |
CHECK_NUMBER (insval); |
4462 |
inserted = XFASTINT (insval); |
inserted = XFASTINT (insval); |
4463 |
|
|
4464 |
if (!NILP (visit)) |
if (!NILP (visit)) |
4484 |
insval = call1 (Fcar (p), make_number (inserted)); |
insval = call1 (Fcar (p), make_number (inserted)); |
4485 |
if (!NILP (insval)) |
if (!NILP (insval)) |
4486 |
{ |
{ |
4487 |
CHECK_NUMBER (insval, 0); |
CHECK_NUMBER (insval); |
4488 |
inserted = XFASTINT (insval); |
inserted = XFASTINT (insval); |
4489 |
} |
} |
4490 |
QUIT; |
QUIT; |
5290 |
Lisp_Object handler; |
Lisp_Object handler; |
5291 |
Lisp_Object filename; |
Lisp_Object filename; |
5292 |
|
|
5293 |
CHECK_BUFFER (buf, 0); |
CHECK_BUFFER (buf); |
5294 |
b = XBUFFER (buf); |
b = XBUFFER (buf); |
5295 |
|
|
5296 |
if (!STRINGP (b->filename)) return Qt; |
if (!STRINGP (b->filename)) return Qt; |
5723 |
int changed; |
int changed; |
5724 |
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
5725 |
|
|
5726 |
CHECK_STRING (string, 0); |
CHECK_STRING (string); |
5727 |
|
|
5728 |
realdir = dir; |
realdir = dir; |
5729 |
name = string; |
name = string; |
5853 |
} |
} |
5854 |
if (!NILP (default_filename)) |
if (!NILP (default_filename)) |
5855 |
{ |
{ |
5856 |
CHECK_STRING (default_filename, 3); |
CHECK_STRING (default_filename); |
5857 |
default_filename = double_dollars (default_filename); |
default_filename = double_dollars (default_filename); |
5858 |
} |
} |
5859 |
|
|