comparison src/file-coding.c @ 2500:3d8143fc88e1

[xemacs-hg @ 2005-01-24 23:33:30 by ben] get working with VC7 config.inc.samp: Declare OPTIONAL_LIBRARY_DIR as root of library directories. Redo all graphics library defaults to mirror the versions and directories in the current binary aux distribution on xemacs web site. Enable TIFF and COMPFACE by default since you can now compile with them and binary libs are provided. xemacs.mak: Put our own directories first in case of conflict (e.g. config.h in compface). xemacs.mak: Use MSVCRT to avoid link problems. s/windowsnt.h: bytecode.c, print.c: Add casts to avoid warning. compiler.h: Add MSC_VERSION and include definitions of DOESNT_RETURN and friends here, like for GCC. Need different definitions for VC7 and VC6. s/windowsnt.h: Remove stuff moved to compiler.h. Disable warning 4646 ("function declared with __declspec(noreturn) has non-void return type") on VC7 since lots of Lisp primitives trigger this and there is no easy way to kludge around the warning. glyphs-eimage.c: Some really nasty hacks to allow TIFF and JPEG to both be compiled. #### The better solution is to move the TIFF and JPEG code to different files. glyphs-msw.c: Define __STDC__ to avoid problems with compface.h. intl-auto-encap-win32.c, intl-auto-encap-win32.h, intl-encap-win32.c, syswindows.h: Those wankers at Microsoft cannot leave well enough alone. Various functions change parameter types semi-randomly between VC6 and VC7, so we need to include our own versions that can handle both kinds with appropriate casting. EmacsFrame.c, EmacsShell-sub.c, EmacsShell.c, alloc.c, alloca.c, buffer.c, bytecode.c, charset.h, chartab.c, cm.c, console-stream.c, console.c, data.c, debug.h, device-msw.c, device-tty.c, device-x.c, doprnt.c, dumper.c, dynarr.c, elhash.c, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, free-hook.c, gccache-gtk.c, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-x.c, glyphs.c, gtk-glue.c, gutter.c, input-method-xlib.c, insdel.c, intl-win32.c, keymap.c, lisp.h, lread.c, lstream.c, macros.c, malloc.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, mule-coding.c, native-gtk-toolbar.c, number.c, objects-msw.c, objects.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, regex.c, scrollbar-gtk.c, scrollbar-x.c, search.c, select-x.c, signal.c, specifier.c, specifier.h, strftime.c, sunplay.c, symbols.c, sysdep.c, sysproc.h, text.c, text.h, toolbar-common.c, toolbar-msw.c, toolbar.c, ui-gtk.c, unexnt.c, unicode.c, win32.c, window.c, xgccache.c, s/windowsnt.h: abort() -> ABORT(). Eliminate preprocessor games with abort() since it creates huge problems in VC7, solvable only by including massive amounts of files in every compile (and not worth it).
author ben
date Mon, 24 Jan 2005 23:34:34 +0000
parents ecf1ebac70d8
children 7de8d9ab7bbd
comparison
equal deleted inserted replaced
2499:4c5ee4d2e921 2500:3d8143fc88e1
728 static Lisp_Object 728 static Lisp_Object
729 eol_type_to_symbol (enum eol_type type) 729 eol_type_to_symbol (enum eol_type type)
730 { 730 {
731 switch (type) 731 switch (type)
732 { 732 {
733 default: abort (); 733 default: ABORT ();
734 case EOL_LF: return Qlf; 734 case EOL_LF: return Qlf;
735 case EOL_CRLF: return Qcrlf; 735 case EOL_CRLF: return Qcrlf;
736 case EOL_CR: return Qcr; 736 case EOL_CR: return Qcr;
737 case EOL_AUTODETECT: return Qnil; 737 case EOL_AUTODETECT: return Qnil;
738 } 738 }
1577 { 1577 {
1578 case EOL_AUTODETECT: return coding_system; 1578 case EOL_AUTODETECT: return coding_system;
1579 case EOL_LF: new_coding_system = CODING_SYSTEM_EOL_LF (cs); break; 1579 case EOL_LF: new_coding_system = CODING_SYSTEM_EOL_LF (cs); break;
1580 case EOL_CR: new_coding_system = CODING_SYSTEM_EOL_CR (cs); break; 1580 case EOL_CR: new_coding_system = CODING_SYSTEM_EOL_CR (cs); break;
1581 case EOL_CRLF: new_coding_system = CODING_SYSTEM_EOL_CRLF (cs); break; 1581 case EOL_CRLF: new_coding_system = CODING_SYSTEM_EOL_CRLF (cs); break;
1582 default: abort (); return Qnil; 1582 default: ABORT (); return Qnil;
1583 } 1583 }
1584 1584
1585 return NILP (new_coding_system) ? coding_system : new_coding_system; 1585 return NILP (new_coding_system) ? coding_system : new_coding_system;
1586 } 1586 }
1587 1587
2677 case 1: return DECODES_BYTE_TO_CHARACTER; 2677 case 1: return DECODES_BYTE_TO_CHARACTER;
2678 case 2: return DECODES_CHARACTER_TO_BYTE; 2678 case 2: return DECODES_CHARACTER_TO_BYTE;
2679 case 3: return DECODES_CHARACTER_TO_CHARACTER; 2679 case 3: return DECODES_CHARACTER_TO_CHARACTER;
2680 } 2680 }
2681 2681
2682 abort (); 2682 ABORT ();
2683 return DECODES_BYTE_TO_BYTE; 2683 return DECODES_BYTE_TO_BYTE;
2684 } 2684 }
2685 2685
2686 2686
2687 /************************************************************************/ 2687 /************************************************************************/
2834 write_fmt_string (printcharfun, "(%s)", 2834 write_fmt_string (printcharfun, "(%s)",
2835 data->subtype == EOL_LF ? "lf" : 2835 data->subtype == EOL_LF ? "lf" :
2836 data->subtype == EOL_CRLF ? "crlf" : 2836 data->subtype == EOL_CRLF ? "crlf" :
2837 data->subtype == EOL_CR ? "cr" : 2837 data->subtype == EOL_CR ? "cr" :
2838 data->subtype == EOL_AUTODETECT ? "nil" : 2838 data->subtype == EOL_AUTODETECT ? "nil" :
2839 (abort(), "")); 2839 (ABORT(), ""));
2840 } 2840 }
2841 2841
2842 static enum source_sink_type 2842 static enum source_sink_type
2843 convert_eol_conversion_end_type (Lisp_Object UNUSED (codesys)) 2843 convert_eol_conversion_end_type (Lisp_Object UNUSED (codesys))
2844 { 2844 {
2882 { 2882 {
2883 case EOL_LF: return Qlf; 2883 case EOL_LF: return Qlf;
2884 case EOL_CRLF: return Qcrlf; 2884 case EOL_CRLF: return Qcrlf;
2885 case EOL_CR: return Qcr; 2885 case EOL_CR: return Qcr;
2886 case EOL_AUTODETECT: return Qnil; 2886 case EOL_AUTODETECT: return Qnil;
2887 default: abort (); 2887 default: ABORT ();
2888 } 2888 }
2889 } 2889 }
2890 2890
2891 return Qunbound; 2891 return Qunbound;
2892 } 2892 }
3034 { 3034 {
3035 case EOL_LF: return Fget_coding_system (Qconvert_eol_lf); 3035 case EOL_LF: return Fget_coding_system (Qconvert_eol_lf);
3036 case EOL_CRLF: return Fget_coding_system (Qconvert_eol_crlf); 3036 case EOL_CRLF: return Fget_coding_system (Qconvert_eol_crlf);
3037 case EOL_CR: return Fget_coding_system (Qconvert_eol_cr); 3037 case EOL_CR: return Fget_coding_system (Qconvert_eol_cr);
3038 case EOL_AUTODETECT: return str->codesys; 3038 case EOL_AUTODETECT: return str->codesys;
3039 default: abort (); return Qnil; 3039 default: ABORT (); return Qnil;
3040 } 3040 }
3041 } 3041 }
3042 3042
3043 3043
3044 /************************************************************************/ 3044 /************************************************************************/
3254 for (j = 0; j < Dynarr_length (cats); j++) 3254 for (j = 0; j < Dynarr_length (cats); j++)
3255 if (id == Dynarr_at (cats, j).id) 3255 if (id == Dynarr_at (cats, j).id)
3256 return Dynarr_at (cats, j).sym; 3256 return Dynarr_at (cats, j).sym;
3257 } 3257 }
3258 3258
3259 abort (); 3259 ABORT ();
3260 return Qnil; /* (usually) not reached */ 3260 return Qnil; /* (usually) not reached */
3261 } 3261 }
3262 3262
3263 static Lisp_Object 3263 static Lisp_Object
3264 detection_result_number_to_symbol (enum detection_result result) 3264 detection_result_number_to_symbol (enum detection_result result)
3275 FROB (Qquite_improbable, DET_QUITE_IMPROBABLE); 3275 FROB (Qquite_improbable, DET_QUITE_IMPROBABLE);
3276 FROB (Qnearly_impossible, DET_NEARLY_IMPOSSIBLE); 3276 FROB (Qnearly_impossible, DET_NEARLY_IMPOSSIBLE);
3277 #undef FROB 3277 #undef FROB
3278 } 3278 }
3279 3279
3280 abort (); 3280 ABORT ();
3281 return Qnil; /* (usually) not reached */ 3281 return Qnil; /* (usually) not reached */
3282 } 3282 }
3283 3283
3284 #if 0 /* not used */ 3284 #if 0 /* not used */
3285 static enum detection_result 3285 static enum detection_result