Mercurial > hg > xemacs-beta
changeset 564:001628b7a5b3
[xemacs-hg @ 2001-05-24 09:37:25 by yoshiki]
Fix broken build on Linux.
* buffer.c (Qtext_conversion_error): Moved from file-coding.c
so that --with-file-coding=no will compile corectly.
* buffer.c (syms_of_buffer): Define Qtext_conversion_error.
Also moved from file-coding.c
* file-coding.c (Qtext_conversion_error): Moved to buffer.c
* file-coding.c (syms_of_file_coding): Moved Qtext_conversion_error
initialization to buffer.c
* emodules.c (Qdll_error): New error.
* emodules.c (syms_of_module): Declare Qdll_error.
* esd.c (esd_play_sound_data): sound_warn accepts only one arg.
* miscplay.c (sndcnv8S_2mono):
* miscplay.c (sndcnv2monounsigned):
* miscplay.c (int2ulaw):
* miscplay.c (sndcnv2byteLE):
* miscplay.c (sndcnv2byteBE):
* miscplay.c (sndcnv2monobyteLE):
* miscplay.c (sndcnv2monobyteBE): Replace signed Char_Binary with
Char_Binary. There's no type called signed char in C.
Also remove audio: from error message. sound_warn and sound_perror
prepends them.
author | yoshiki |
---|---|
date | Thu, 24 May 2001 09:37:30 +0000 |
parents | 183866b06e0b |
children | e9162e1ea200 |
files | src/ChangeLog src/buffer.c src/emodules.c src/esd.c src/file-coding.c src/miscplay.c |
diffstat | 6 files changed, 59 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Thu May 24 07:51:33 2001 +0000 +++ b/src/ChangeLog Thu May 24 09:37:30 2001 +0000 @@ -1,3 +1,27 @@ +2001-05-24 Yoshiki Hayashi <yoshiki@xemacs.org> + + * buffer.c (Qtext_conversion_error): Moved from file-coding.c + so that --with-file-coding=no will compile corectly. + * buffer.c (syms_of_buffer): Define Qtext_conversion_error. + Also moved from file-coding.c + * file-coding.c (Qtext_conversion_error): Moved to buffer.c + * file-coding.c (syms_of_file_coding): Moved Qtext_conversion_error + initialization to buffer.c + * emodules.c (Qdll_error): New error. + * emodules.c (syms_of_module): Declare Qdll_error. + + * esd.c (esd_play_sound_data): sound_warn accepts only one arg. + * miscplay.c (sndcnv8S_2mono): + * miscplay.c (sndcnv2monounsigned): + * miscplay.c (int2ulaw): + * miscplay.c (sndcnv2byteLE): + * miscplay.c (sndcnv2byteBE): + * miscplay.c (sndcnv2monobyteLE): + * miscplay.c (sndcnv2monobyteBE): Replace signed Char_Binary with + Char_Binary. There's no type called signed char in C. + Also remove audio: from error message. sound_warn and sound_perror + prepends them. + 2001-05-24 Ben Wing <ben@xemacs.org> * Makefile.in.in (objs):
--- a/src/buffer.c Thu May 24 07:51:33 2001 +0000 +++ b/src/buffer.c Thu May 24 09:37:30 2001 +0000 @@ -93,6 +93,8 @@ #include "sysfile.h" +Lisp_Object Qtext_conversion_error; + struct buffer *current_buffer; /* the current buffer */ /* This structure holds the default values of the buffer-local variables @@ -2096,6 +2098,8 @@ { INIT_LRECORD_IMPLEMENTATION (buffer); + DEFERROR_STANDARD (Qtext_conversion_error, Qconversion_error); + DEFSYMBOL (Qbuffer_live_p); DEFSYMBOL (Qbuffer_or_string_p); DEFSYMBOL (Qmode_class);
--- a/src/emodules.c Thu May 24 07:51:33 2001 +0000 +++ b/src/emodules.c Thu May 24 09:37:30 2001 +0000 @@ -32,6 +32,8 @@ /* Load path */ Lisp_Object Vmodule_load_path; +Lisp_Object Qdll_error; + typedef struct _emodules_list { int used; /* Is this slot used? */ @@ -527,6 +529,7 @@ void syms_of_module (void) { + DEFERROR_STANDARD (Qdll_error, Qerror); DEFSUBR(Fload_module); DEFSUBR(Flist_modules); #ifdef DANGEROUS_NASTY_SCARY_MONSTER
--- a/src/esd.c Thu May 24 07:51:33 2001 +0000 +++ b/src/esd.c Thu May 24 09:37:30 2001 +0000 @@ -61,7 +61,7 @@ ffmt = analyze_format(data,&fmt,&speed,&tracks,&parsesndfile); if (ffmt != fmtRaw && ffmt != fmtSunAudio && ffmt != fmtWave) { - sound_warn("audio: Unsupported file format (neither RAW, nor Sun/DECAudio, nor WAVE)"); + sound_warn("Unsupported file format (neither RAW, nor Sun/DECAudio, nor WAVE)"); return 0; } @@ -85,16 +85,24 @@ flags |= ESD_BITS16; break; default: - sound_warn ("audio: byte format %d unimplemented", fmt); - return 0; + { + Extbyte warn_buf[255]; + sprintf (warn_buf, "byte format %d unimplemented", fmt); + sound_warn (warn_buf); + return 0; + } } switch (tracks) { case 1: flags |= ESD_MONO; break; case 2: flags |= ESD_STEREO; break; default: - sound_warn ("audio: %d channels - only 1 or 2 supported", tracks); - return 0; + { + Extbyte warn_buf[255]; + sprintf (warn_buf, "%d channels - only 1 or 2 supported", tracks); + sound_warn (warn_buf); + return 0; + } } sock = esd_play_stream(flags, speed, NULL, "xemacs"); @@ -108,11 +116,13 @@ for (cptr = optr; (crtn = sndcnv((void **)&cptr,&prtn, (void **)&sptr)) > 0; ) { if ((wrtn = write(sock,sptr,crtn)) < 0) { - sound_perror ("audio: write error"); + sound_perror ("write error"); goto END_OF_PLAY; } if (wrtn != crtn) { - sound_warn ("audio: only wrote %d of %d bytes", wrtn, crtn); + Extbyte warn_buf[255]; + sprintf (warn_buf , "only wrote %d of %d bytes", wrtn, crtn); + sound_warn (warn_buf); goto END_OF_PLAY; } }
--- a/src/file-coding.c Thu May 24 07:51:33 2001 +0000 +++ b/src/file-coding.c Thu May 24 09:37:30 2001 +0000 @@ -37,8 +37,6 @@ #endif #include "file-coding.h" -Lisp_Object Qtext_conversion_error; - Lisp_Object Vkeyboard_coding_system; Lisp_Object Vterminal_coding_system; Lisp_Object Vcoding_system_for_read; @@ -5589,8 +5587,6 @@ { INIT_LRECORD_IMPLEMENTATION (coding_system); - DEFERROR_STANDARD (Qtext_conversion_error, Qconversion_error); - DEFSUBR (Fcoding_system_p); DEFSUBR (Ffind_coding_system); DEFSUBR (Fget_coding_system);
--- a/src/miscplay.c Thu May 24 07:51:33 2001 +0000 +++ b/src/miscplay.c Thu May 24 09:37:30 2001 +0000 @@ -386,8 +386,8 @@ dest = miscplay_sndbuf; while (count--) { - *dest++ = (UChar_Binary)(((int)*((signed Char_Binary *)(src)) + - (int)*((signed Char_Binary *)(src+1))) / 2); + *dest++ = (UChar_Binary)(((int)*((Char_Binary *)(src)) + + (int)*((Char_Binary *)(src+1))) / 2); src += 2; } *data = src; @@ -410,8 +410,8 @@ dest = miscplay_sndbuf; while (count--) { - *dest++ = (UChar_Binary)(((int)*((signed Char_Binary *)(src)) + - (int)*((signed Char_Binary *)(src+1))) / 2) ^ 0x80; + *dest++ = (UChar_Binary)(((int)*((Char_Binary *)(src)) + + (int)*((Char_Binary *)(src+1))) / 2) ^ 0x80; src += 2; } *data = src; @@ -440,7 +440,7 @@ /* Convert a number in the range -32768..32767 to an 8 bit ulaw encoded number --- I hope, I got this conversion right :-) */ -static inline signed Char_Binary int2ulaw(int i) +static inline Char_Binary int2ulaw(int i) { /* Lookup table for fast calculation of number of bits that need shifting*/ static short int t_bits[128] = { @@ -664,7 +664,7 @@ *outbuf = dest = miscplay_sndbuf; while (count--) { - *dest++ = (UChar_Binary)(((signed Char_Binary *)src)[1] ^ (signed Char_Binary)0x80); + *dest++ = (UChar_Binary)(((Char_Binary *)src)[1] ^ (Char_Binary)0x80); src += 2; } *data = src; @@ -686,7 +686,7 @@ *outbuf = dest = miscplay_sndbuf; while (count--) { - *dest++ = (UChar_Binary)(((signed Char_Binary *)src)[0] ^ (signed Char_Binary)0x80); + *dest++ = (UChar_Binary)(((Char_Binary *)src)[0] ^ (Char_Binary)0x80); src += 2; } *data = src; @@ -709,8 +709,8 @@ *outbuf = dest = miscplay_sndbuf; while (count--) { - *dest++ = (UChar_Binary)(((int)((signed Char_Binary *)src)[1] + - (int)((signed Char_Binary *)src)[3]) / 2 ^ 0x80); + *dest++ = (UChar_Binary)(((int)((Char_Binary *)src)[1] + + (int)((Char_Binary *)src)[3]) / 2 ^ 0x80); src += 4; } *data = src; @@ -733,8 +733,8 @@ *outbuf = dest = miscplay_sndbuf; while (count--) { - *dest++ = (UChar_Binary)(((int)((signed Char_Binary *)src)[0] + - (int)((signed Char_Binary *)src)[2]) / 2 ^ 0x80); + *dest++ = (UChar_Binary)(((int)((Char_Binary *)src)[0] + + (int)((Char_Binary *)src)[2]) / 2 ^ 0x80); src += 4; } *data = src;