Mercurial > hg > xemacs-beta
comparison src/miscplay.c @ 593:5fd7ba8b56e7
[xemacs-hg @ 2001-05-31 12:45:27 by ben]
xemacs-faq.texi: Major rewrite.
Update all MS Windows info to current.
Redo section 6.1 almost completely.
Incorporate sections 1 and 2 of Hrvoje's FAQ.
etags.el: Fix infloop when going up to the root.
s\cygwin32.h: Don't unilaterally include ntplay, but only when we're compiling
with native sound (look in configure now).
event-msw.c: Fix yet more problems with C-g handling.
Implement debug-mswindows-events.
event-stream.c, events.h, signal.c, sysdep.h:
Rearrange the signal-handling code to eliminate the former
spaghetti logic paths in it. Document clearly what
"low-level" and "high-level" timeouts are. Rename some
functions with unclear names (e.g. "...alarm...") to names
that reflect what they actually do (e.g. "...async_timeout...").
Fix numerous bugs discovered in the process.
console-x.h, event-Xt.c, event-msw.c, frame-x.c:
Hopefully make XEmacs properly maintain the "iconified"
state on frames at all times. This should fix the "can't
delete a frame with C-x 5 0 when there's another iconified
frame out there" bug.
Put a notice in of further changes that should probably
be made to clean up the frame-visibility support.
(especially directed at Jan Vroonhof)
lisp.h, miscplay.c:
Rename SBufbyte to CBufbyte to avoid a misleading name.
Eliminate UChar, which is not used anywhere and contributes
no semantic info. Add a comment about the documentation-only
properties of the char/unsigned char typedefs. Add
SChar_Binary as an explicitly `signed' version of Char_Binary
and put back the `signed' declarations in miscplay.c.
alloc.c:
Use char typedefs.
console-msw.c, device-msw.c, dialog-msw.c, editfns.c, fileio.c, glyphs-eimage.c, menubar-msw.c, ntplay.c, objects-msw.c, realpath.c, redisplay-msw.c, select-msw.c, syswindows.h, win32.c:
Eliminate numerous C++ errors.
frame-msw.c:
Eliminate numerous C++ errors and Mule-ize.
glyphs-msw.c:
Eliminate numerous C++ errors and use char typedefs.
configure.in:
Fix problems detecting both native and Linux sound on Cygwin
when compiled with --with-msw=no.
Rearrange file-coding handling a bit to avoid warning when
compiling with Mule.
configure.in, configure.usage, INSTALL:
Document XEMACS_CC and corresponding compiler option --xemacs-compiler.
Explain how to build xemacs using a C++ compiler.
author | ben |
---|---|
date | Thu, 31 May 2001 12:45:41 +0000 |
parents | db376c5066a7 |
children | 13e3d7ae7155 |
comparison
equal
deleted
inserted
replaced
592:4f6ba8f1fb3d | 593:5fd7ba8b56e7 |
---|---|
384 src = (UChar_Binary *) *data; | 384 src = (UChar_Binary *) *data; |
385 *outbuf = | 385 *outbuf = |
386 dest = miscplay_sndbuf; | 386 dest = miscplay_sndbuf; |
387 while (count--) | 387 while (count--) |
388 { | 388 { |
389 *dest++ = (UChar_Binary)(((int)*((Char_Binary *)(src)) + | 389 *dest++ = (UChar_Binary)(((int)*((SChar_Binary *)(src)) + |
390 (int)*((Char_Binary *)(src+1))) / 2); | 390 (int)*((SChar_Binary *)(src+1))) / 2); |
391 src += 2; | 391 src += 2; |
392 } | 392 } |
393 *data = src; | 393 *data = src; |
394 return(rc); | 394 return(rc); |
395 } | 395 } |
408 src = (UChar_Binary *) *data; | 408 src = (UChar_Binary *) *data; |
409 *outbuf = | 409 *outbuf = |
410 dest = miscplay_sndbuf; | 410 dest = miscplay_sndbuf; |
411 while (count--) | 411 while (count--) |
412 { | 412 { |
413 *dest++ = (UChar_Binary)(((int)*((Char_Binary *)(src)) + | 413 *dest++ = (UChar_Binary)(((int)*((SChar_Binary *)(src)) + |
414 (int)*((Char_Binary *)(src+1))) / 2) ^ 0x80; | 414 (int)*((SChar_Binary *)(src+1))) / 2) ^ 0x80; |
415 src += 2; | 415 src += 2; |
416 } | 416 } |
417 *data = src; | 417 *data = src; |
418 return(rc); | 418 return(rc); |
419 } | 419 } |
438 return(rc); | 438 return(rc); |
439 } | 439 } |
440 | 440 |
441 /* Convert a number in the range -32768..32767 to an 8 bit ulaw encoded | 441 /* Convert a number in the range -32768..32767 to an 8 bit ulaw encoded |
442 number --- I hope, I got this conversion right :-) */ | 442 number --- I hope, I got this conversion right :-) */ |
443 static inline Char_Binary int2ulaw(int i) | 443 static inline SChar_Binary int2ulaw(int i) |
444 { | 444 { |
445 /* Lookup table for fast calculation of number of bits that need shifting*/ | 445 /* Lookup table for fast calculation of number of bits that need shifting*/ |
446 static short int t_bits[128] = { | 446 static short int t_bits[128] = { |
447 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, | 447 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, |
448 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | 448 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, |
662 rc = count; | 662 rc = count; |
663 src = (UChar_Binary *) *data; | 663 src = (UChar_Binary *) *data; |
664 *outbuf = | 664 *outbuf = |
665 dest = miscplay_sndbuf; | 665 dest = miscplay_sndbuf; |
666 while (count--) { | 666 while (count--) { |
667 *dest++ = (UChar_Binary)(((Char_Binary *)src)[1] ^ (Char_Binary)0x80); | 667 *dest++ = (UChar_Binary)(((SChar_Binary *)src)[1] ^ (SChar_Binary)0x80); |
668 src += 2; | 668 src += 2; |
669 } | 669 } |
670 *data = src; | 670 *data = src; |
671 return(rc); | 671 return(rc); |
672 } | 672 } |
684 rc = count; | 684 rc = count; |
685 src = (UChar_Binary *) *data; | 685 src = (UChar_Binary *) *data; |
686 *outbuf = | 686 *outbuf = |
687 dest = miscplay_sndbuf; | 687 dest = miscplay_sndbuf; |
688 while (count--) { | 688 while (count--) { |
689 *dest++ = (UChar_Binary)(((Char_Binary *)src)[0] ^ (Char_Binary)0x80); | 689 *dest++ = (UChar_Binary)(((SChar_Binary *)src)[0] ^ (SChar_Binary)0x80); |
690 src += 2; | 690 src += 2; |
691 } | 691 } |
692 *data = src; | 692 *data = src; |
693 return(rc); | 693 return(rc); |
694 } | 694 } |
707 rc = count; | 707 rc = count; |
708 src = (UChar_Binary *) *data; | 708 src = (UChar_Binary *) *data; |
709 *outbuf = | 709 *outbuf = |
710 dest = miscplay_sndbuf; | 710 dest = miscplay_sndbuf; |
711 while (count--) { | 711 while (count--) { |
712 *dest++ = (UChar_Binary)(((int)((Char_Binary *)src)[1] + | 712 *dest++ = (UChar_Binary)(((int)((SChar_Binary *)src)[1] + |
713 (int)((Char_Binary *)src)[3]) / 2 ^ 0x80); | 713 (int)((SChar_Binary *)src)[3]) / 2 ^ 0x80); |
714 src += 4; | 714 src += 4; |
715 } | 715 } |
716 *data = src; | 716 *data = src; |
717 return(rc); | 717 return(rc); |
718 } | 718 } |
731 rc = count; | 731 rc = count; |
732 src = (UChar_Binary *) *data; | 732 src = (UChar_Binary *) *data; |
733 *outbuf = | 733 *outbuf = |
734 dest = miscplay_sndbuf; | 734 dest = miscplay_sndbuf; |
735 while (count--) { | 735 while (count--) { |
736 *dest++ = (UChar_Binary)(((int)((Char_Binary *)src)[0] + | 736 *dest++ = (UChar_Binary)(((int)((SChar_Binary *)src)[0] + |
737 (int)((Char_Binary *)src)[2]) / 2 ^ 0x80); | 737 (int)((SChar_Binary *)src)[2]) / 2 ^ 0x80); |
738 src += 4; | 738 src += 4; |
739 } | 739 } |
740 *data = src; | 740 *data = src; |
741 return(rc); | 741 return(rc); |
742 } | 742 } |