aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/make-docfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/make-docfile.c')
-rw-r--r--lib-src/make-docfile.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index ba73f5800a7..802b4e09e67 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -60,6 +60,10 @@ Boston, MA 02111-1307, USA. */
60#define READ_BINARY "r" 60#define READ_BINARY "r"
61#endif /* not DOS_NT */ 61#endif /* not DOS_NT */
62 62
63#ifndef IS_DIRECTORY_SEP
64#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/')
65#endif
66
63int scan_file (); 67int scan_file ();
64int scan_lisp_file (); 68int scan_lisp_file ();
65int scan_c_file (); 69int scan_c_file ();
@@ -100,7 +104,7 @@ fatal (s1, s2)
100 char *s1, *s2; 104 char *s1, *s2;
101{ 105{
102 error (s1, s2); 106 error (s1, s2);
103 exit (1); 107 exit (EXIT_FAILURE);
104} 108}
105 109
106/* Like malloc but get fatal error if memory is exhausted. */ 110/* Like malloc but get fatal error if memory is exhausted. */
@@ -183,11 +187,13 @@ void
183put_filename (filename) 187put_filename (filename)
184 char *filename; 188 char *filename;
185{ 189{
186 char *tmp = filename; 190 char *tmp;
187 int len; 191
188 192 for (tmp = filename; *tmp; tmp++)
189 while ((tmp = index (filename, '/'))) 193 {
190 filename = tmp + 1; 194 if (IS_DIRECTORY_SEP(*tmp))
195 filename = tmp + 1;
196 }
191 197
192 putc (037, outfile); 198 putc (037, outfile);
193 putc ('S', outfile); 199 putc ('S', outfile);
@@ -1204,3 +1210,5 @@ scan_lisp_file (filename, mode)
1204 1210
1205/* arch-tag: f7203aaf-991a-4238-acb5-601db56f2894 1211/* arch-tag: f7203aaf-991a-4238-acb5-601db56f2894
1206 (do not change this comment) */ 1212 (do not change this comment) */
1213
1214/* make-docfile.c ends here */