Mercurial > hg > xemacs-beta
comparison src/fns.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 | 6fa9919a9a0b |
comparison
equal
deleted
inserted
replaced
2499:4c5ee4d2e921 | 2500:3d8143fc88e1 |
---|---|
739 (Ibyte *) MALLOC_OR_ALLOCA (total_length * MAX_ICHAR_LEN); | 739 (Ibyte *) MALLOC_OR_ALLOCA (total_length * MAX_ICHAR_LEN); |
740 string_result_ptr = string_result; | 740 string_result_ptr = string_result; |
741 break; | 741 break; |
742 default: | 742 default: |
743 val = Qnil; | 743 val = Qnil; |
744 abort (); | 744 ABORT (); |
745 } | 745 } |
746 } | 746 } |
747 | 747 |
748 | 748 |
749 if (CONSP (val)) | 749 if (CONSP (val)) |
1029 bit_vector_bit (XBIT_VECTOR (sequence), i)); | 1029 bit_vector_bit (XBIT_VECTOR (sequence), i)); |
1030 return result; | 1030 return result; |
1031 } | 1031 } |
1032 else | 1032 else |
1033 { | 1033 { |
1034 abort (); /* unreachable, since Flength (sequence) did not get | 1034 ABORT (); /* unreachable, since Flength (sequence) did not get |
1035 an error */ | 1035 an error */ |
1036 return Qnil; | 1036 return Qnil; |
1037 } | 1037 } |
1038 } | 1038 } |
1039 | 1039 |
3252 result = Ffuncall (2, args); | 3252 result = Ffuncall (2, args); |
3253 if (vals) vals[gcpro1.nvars++] = result; | 3253 if (vals) vals[gcpro1.nvars++] = result; |
3254 } | 3254 } |
3255 } | 3255 } |
3256 else | 3256 else |
3257 abort (); /* unreachable, since Flength (sequence) did not get an error */ | 3257 ABORT (); /* unreachable, since Flength (sequence) did not get an error */ |
3258 | 3258 |
3259 if (vals) | 3259 if (vals) |
3260 UNGCPRO; | 3260 UNGCPRO; |
3261 } | 3261 } |
3262 | 3262 |
3871 base64 characters will be single-byte. */ | 3871 base64 characters will be single-byte. */ |
3872 encoded = (Ibyte *) MALLOC_OR_ALLOCA (allength); | 3872 encoded = (Ibyte *) MALLOC_OR_ALLOCA (allength); |
3873 encoded_length = base64_encode_1 (XLSTREAM (input), encoded, | 3873 encoded_length = base64_encode_1 (XLSTREAM (input), encoded, |
3874 NILP (no_line_break)); | 3874 NILP (no_line_break)); |
3875 if (encoded_length > allength) | 3875 if (encoded_length > allength) |
3876 abort (); | 3876 ABORT (); |
3877 Lstream_delete (XLSTREAM (input)); | 3877 Lstream_delete (XLSTREAM (input)); |
3878 | 3878 |
3879 /* Now we have encoded the region, so we insert the new contents | 3879 /* Now we have encoded the region, so we insert the new contents |
3880 and delete the old. (Insert first in order to preserve markers.) */ | 3880 and delete the old. (Insert first in order to preserve markers.) */ |
3881 buffer_insert_raw_string_1 (buf, begv, encoded, encoded_length, 0); | 3881 buffer_insert_raw_string_1 (buf, begv, encoded, encoded_length, 0); |
3913 input = make_lisp_string_input_stream (string, 0, -1); | 3913 input = make_lisp_string_input_stream (string, 0, -1); |
3914 encoded = (Ibyte *) MALLOC_OR_ALLOCA (allength); | 3914 encoded = (Ibyte *) MALLOC_OR_ALLOCA (allength); |
3915 encoded_length = base64_encode_1 (XLSTREAM (input), encoded, | 3915 encoded_length = base64_encode_1 (XLSTREAM (input), encoded, |
3916 NILP (no_line_break)); | 3916 NILP (no_line_break)); |
3917 if (encoded_length > allength) | 3917 if (encoded_length > allength) |
3918 abort (); | 3918 ABORT (); |
3919 Lstream_delete (XLSTREAM (input)); | 3919 Lstream_delete (XLSTREAM (input)); |
3920 result = make_string (encoded, encoded_length); | 3920 result = make_string (encoded, encoded_length); |
3921 unbind_to (speccount); | 3921 unbind_to (speccount); |
3922 return result; | 3922 return result; |
3923 } | 3923 } |
3946 input = make_lisp_buffer_input_stream (buf, begv, zv, 0); | 3946 input = make_lisp_buffer_input_stream (buf, begv, zv, 0); |
3947 /* We need to allocate enough room for decoding the text. */ | 3947 /* We need to allocate enough room for decoding the text. */ |
3948 decoded = (Ibyte *) MALLOC_OR_ALLOCA (length * MAX_ICHAR_LEN); | 3948 decoded = (Ibyte *) MALLOC_OR_ALLOCA (length * MAX_ICHAR_LEN); |
3949 decoded_length = base64_decode_1 (XLSTREAM (input), decoded, &cc_decoded_length); | 3949 decoded_length = base64_decode_1 (XLSTREAM (input), decoded, &cc_decoded_length); |
3950 if (decoded_length > length * MAX_ICHAR_LEN) | 3950 if (decoded_length > length * MAX_ICHAR_LEN) |
3951 abort (); | 3951 ABORT (); |
3952 Lstream_delete (XLSTREAM (input)); | 3952 Lstream_delete (XLSTREAM (input)); |
3953 | 3953 |
3954 /* Now we have decoded the region, so we insert the new contents | 3954 /* Now we have decoded the region, so we insert the new contents |
3955 and delete the old. (Insert first in order to preserve markers.) */ | 3955 and delete the old. (Insert first in order to preserve markers.) */ |
3956 BUF_SET_PT (buf, begv); | 3956 BUF_SET_PT (buf, begv); |
3987 | 3987 |
3988 input = make_lisp_string_input_stream (string, 0, -1); | 3988 input = make_lisp_string_input_stream (string, 0, -1); |
3989 decoded_length = base64_decode_1 (XLSTREAM (input), decoded, | 3989 decoded_length = base64_decode_1 (XLSTREAM (input), decoded, |
3990 &cc_decoded_length); | 3990 &cc_decoded_length); |
3991 if (decoded_length > length * MAX_ICHAR_LEN) | 3991 if (decoded_length > length * MAX_ICHAR_LEN) |
3992 abort (); | 3992 ABORT (); |
3993 Lstream_delete (XLSTREAM (input)); | 3993 Lstream_delete (XLSTREAM (input)); |
3994 | 3994 |
3995 result = make_string (decoded, decoded_length); | 3995 result = make_string (decoded, decoded_length); |
3996 unbind_to (speccount); | 3996 unbind_to (speccount); |
3997 return result; | 3997 return result; |