Mercurial > hg > xemacs-beta
comparison src/alloc.c @ 28:1917ad0d78d7 r19-15b97
Import from CVS: tag r19-15b97
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:51:55 +0200 |
parents | 441bb1e64a06 |
children | ec9a17fef872 |
comparison
equal
deleted
inserted
replaced
27:0a3286277d9b | 28:1917ad0d78d7 |
---|---|
2574 | 2574 |
2575 static void | 2575 static void |
2576 PURESIZE_h(long int puresize) | 2576 PURESIZE_h(long int puresize) |
2577 { | 2577 { |
2578 int fd; | 2578 int fd; |
2579 char *PURESIZE_h_file = "PURESIZE.h"; | 2579 char *PURESIZE_h_file = "puresize_adjust.h"; |
2580 char *WARNING = "/* This file is generated by XEmacs, DO NOT MODIFY!!! */\n"; | 2580 char *WARNING = "/* This file is generated by XEmacs, DO NOT MODIFY!!! */\n"; |
2581 char define_PURESIZE[256]; | 2581 char define_PURESIZE[256]; |
2582 | 2582 |
2583 if ((fd = open(PURESIZE_h_file, O_WRONLY|O_CREAT)) < 0) { | 2583 if ((fd = open(PURESIZE_h_file, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0) { |
2584 report_file_error("Can't write PURESIZE", | 2584 report_file_error("Can't write PURESIZE_ADJUSTMENT", |
2585 Fcons(build_ext_string(PURESIZE_h_file, FORMAT_FILENAME), | 2585 Fcons(build_ext_string(PURESIZE_h_file, FORMAT_FILENAME), |
2586 Qnil)); | 2586 Qnil)); |
2587 } | 2587 } |
2588 | 2588 |
2589 write(fd, WARNING, strlen(WARNING)); | 2589 write(fd, WARNING, strlen(WARNING)); |
2590 sprintf(define_PURESIZE, "# define PURESIZE %ld\n", puresize); | 2590 sprintf(define_PURESIZE, "# define PURESIZE_ADJUSTMENT %ld\n", |
2591 puresize - RAW_PURESIZE); | |
2591 write(fd, define_PURESIZE, strlen(define_PURESIZE)); | 2592 write(fd, define_PURESIZE, strlen(define_PURESIZE)); |
2592 close(fd); | 2593 close(fd); |
2593 } | 2594 } |
2594 | 2595 |
2595 void | 2596 void |