Mercurial > hg > xemacs-beta
comparison src/nas.c @ 365:30d2cfa1092a r21-1-12
Import from CVS: tag r21-1-12
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:00:12 +0200 |
parents | c5d627a313b1 |
children | cc15677e0335 |
comparison
equal
deleted
inserted
replaced
364:63c3368d1275 | 365:30d2cfa1092a |
---|---|
52 */ | 52 */ |
53 | 53 |
54 #ifdef emacs | 54 #ifdef emacs |
55 #include <config.h> | 55 #include <config.h> |
56 #include "lisp.h" | 56 #include "lisp.h" |
57 #include "sysdep.h" /* for (start|stop)_interrupts */ | |
58 #include "syssignal.h" | |
57 #endif | 59 #endif |
58 | 60 |
59 #if __STDC__ || defined (STDC_HEADERS) | 61 #if __STDC__ || defined (STDC_HEADERS) |
60 # include <stdlib.h> | 62 # include <stdlib.h> |
61 # include <stdarg.h> | 63 # include <stdarg.h> |
65 #ifdef HAVE_UNISTD_H | 67 #ifdef HAVE_UNISTD_H |
66 #include <unistd.h> | 68 #include <unistd.h> |
67 #endif | 69 #endif |
68 | 70 |
69 #include <stdio.h> | 71 #include <stdio.h> |
70 #include "syssignal.h" | 72 |
71 | 73 /* NAS 1.2p5 and previous define these in conflict with GNU libc (at least) */ |
74 #ifndef NAS_USES_OWN_NAMESPACE | |
72 #undef LITTLE_ENDIAN | 75 #undef LITTLE_ENDIAN |
73 #undef BIG_ENDIAN | 76 #undef BIG_ENDIAN |
77 #endif | |
78 | |
74 #include <audio/audiolib.h> | 79 #include <audio/audiolib.h> |
75 #include <audio/soundlib.h> | 80 #include <audio/soundlib.h> |
76 #include <audio/snd.h> | 81 #include <audio/snd.h> |
77 #include <audio/fileutil.h> | 82 #include <audio/fileutil.h> |
83 | |
84 /* If needed (NAS <= 1.2p5) define the NAS_ versions of *_ENDIAN */ | |
85 #ifndef NAS_USES_OWN_NAMESPACE | |
86 #define NAS_LITTLE_ENDIAN LITTLE_ENDIAN | |
87 #define NAS_BIG_ENDIAN BIG_ENDIAN | |
88 #endif | |
78 | 89 |
79 #ifdef emacs | 90 #ifdef emacs |
80 | 91 |
81 # define XTOOLKIT | 92 # define XTOOLKIT |
82 # define XTEVENTS | 93 # define XTEVENTS |
664 si->comment = NULL; | 675 si->comment = NULL; |
665 si->writing = 0; | 676 si->writing = 0; |
666 | 677 |
667 memcpy (&si->h, data, sizeof (SndHeader)); | 678 memcpy (&si->h, data, sizeof (SndHeader)); |
668 | 679 |
669 if (LITTLE_ENDIAN) | 680 if (NAS_LITTLE_ENDIAN) |
670 { | 681 { |
671 char n; | 682 char n; |
672 | 683 |
673 swapl (&si->h.magic, n); | 684 swapl (&si->h.magic, n); |
674 swapl (&si->h.dataOffset, n); | 685 swapl (&si->h.dataOffset, n); |