Mercurial > emacs
changeset 109762:8186d147fb99
Fix fallout from revno 100928, remove dead code in unexcoff.c.
unexcoff.c: Remove the parts used when "emacs" is not defined.
(report_error, report_error_1): Ditto.
(write_segment): Remove "#if 0" unused code.
(make_hdr): Remove code that was "#ifndef NO_REMAP" before
NO_REMAP was removed (in revno 100928).
(start_of_text): Remove unused function (was used only if NO_REMAP
was NOT defined).
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 13 Aug 2010 13:29:48 +0300 |
parents | 31def5db596a |
children | 30994c3466ad 297362357192 |
files | src/ChangeLog src/unexcoff.c |
diffstat | 2 files changed, 8 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Aug 13 12:21:31 2010 +0300 +++ b/src/ChangeLog Fri Aug 13 13:29:48 2010 +0300 @@ -1,5 +1,13 @@ 2010-08-13 Eli Zaretskii <eliz@gnu.org> + * unexcoff.c: Remove the parts used when "emacs" is not defined. + (report_error, report_error_1): Ditto. + (write_segment): Remove "#if 0" unused code. + (make_hdr): Remove code that was "#ifndef NO_REMAP" before + NO_REMAP was removed (in revno 100928). + (start_of_text): Remove unused function (was used only if NO_REMAP + was NOT defined). + * msdos.c (IT_set_face): Fix format string to match argument types. (IT_write_glyphs, IT_note_mode_line_highlight)
--- a/src/unexcoff.c Fri Aug 13 12:21:31 2010 +0300 +++ b/src/unexcoff.c Fri Aug 13 13:29:48 2010 +0300 @@ -74,12 +74,8 @@ * of Dell Computer Corporation. james@bigtex.cactus.org. */ -#ifndef emacs -#define PERROR(arg) perror (arg); return -1 -#else #include <config.h> #define PERROR(file) report_error (file, new) -#endif #ifndef CANNOT_DUMP /* all rest of file! */ @@ -132,7 +128,6 @@ #endif -extern char *start_of_text (); /* Start of text */ extern char *start_of_data (); /* Start of initialized data */ static long block_copy_start; /* Old executable start point */ @@ -155,8 +150,6 @@ #define ADDR_CORRECT(x) ((char *)(x) - (char*)0) -#ifdef emacs - #include <setjmp.h> #include "lisp.h" @@ -169,7 +162,6 @@ close (fd); report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil)); } -#endif /* emacs */ #define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1 #define ERROR1(msg,x) report_error_1 (new, msg, x, 0); return -1 @@ -182,12 +174,7 @@ int a1, a2; { close (fd); -#ifdef emacs error (msg, a1, a2); -#else - fprintf (stderr, msg, a1, a2); - fprintf (stderr, "\n"); -#endif } static int make_hdr (); @@ -319,9 +306,6 @@ to correspond to what we want to dump. */ f_hdr.f_flags |= (F_RELFLG | F_EXEC); - f_ohdr.text_start = (long) start_of_text (); - f_ohdr.tsize = data_start - f_ohdr.text_start; - f_ohdr.data_start = data_start; f_ohdr.dsize = bss_start - f_ohdr.data_start; f_ohdr.bsize = bss_end - bss_start; f_thdr.s_size = f_ohdr.tsize; @@ -417,16 +401,6 @@ nwrite = pagesize; write (new, zeros, nwrite); } -#if 0 /* Now that we have can ask `write' to write more than a page, - it is legit for write do less than the whole amount specified. */ - else if (nwrite != ret) - { - sprintf (buf, - "unexec write failure: addr 0x%x, fileno %d, size 0x%x, wrote 0x%x, errno %d", - ptr, new, nwrite, ret, errno); - PERROR (buf); - } -#endif i += nwrite; ptr += nwrite; } @@ -606,21 +580,6 @@ return 0; } -extern unsigned start __asm__ ("start"); - -/* - * Return the address of the start of the text segment prior to - * doing an unexec. After unexec the return value is undefined. - * See crt0.c for further explanation and _start. - * - */ - -char * -start_of_text (void) -{ - return ((char *) &start); -} - /* **************************************************************** * unexec *