comparison mp3lib/mp3.h @ 17566:f580a7755ac5

Patch by Stefan Huehner / stefan % huehner ! org \ patch replaces '()' for the correct '(void)' in function declarations/prototypes which have no parameters. The '()' syntax tell thats there is a variable list of arguments, so that the compiler cannot check this. The extra CFLAG '-Wstrict-declarations' shows those cases. Comments about a similar patch applied to ffmpeg: That in C++ these mean the same, but in ANSI C the semantics are different; function() is an (obsolete) K&R C style forward declaration, it basically means that the function can have any number and any types of parameters, effectively completely preventing the compiler from doing any sort of type checking. -- Erik Slagter Defining functions with unspecified arguments is allowed but bad. With arguments unspecified the compiler can't report an error/warning if the function is called with incorrect arguments. -- M\ns Rullg\rd
author rathann
date Thu, 09 Feb 2006 14:08:03 +0000
parents e14114170e01
children e7c989f7a7c9
comparison
equal deleted inserted replaced
17565:dc65faaadb04 17566:f580a7755ac5
7 extern void MP3_Init(); 7 extern void MP3_Init();
8 #endif 8 #endif
9 extern int MP3_Open(char *filename,int buffsize); 9 extern int MP3_Open(char *filename,int buffsize);
10 extern void MP3_SeekFrame(int num,int dir); 10 extern void MP3_SeekFrame(int num,int dir);
11 extern void MP3_SeekForward(int num); 11 extern void MP3_SeekForward(int num);
12 extern int MP3_PrintTAG(); 12 extern int MP3_PrintTAG(void);
13 extern int MP3_DecodeFrame(unsigned char *hova,short single); 13 extern int MP3_DecodeFrame(unsigned char *hova,short single);
14 extern int MP3_FillBuffers(); 14 extern int MP3_FillBuffers(void);
15 extern void MP3_PrintHeader(); 15 extern void MP3_PrintHeader(void);
16 extern void MP3_Close(); 16 extern void MP3_Close(void);
17 /* public variables: */ 17 /* public variables: */
18 extern int MP3_eof; // set if EOF reached 18 extern int MP3_eof; // set if EOF reached
19 extern int MP3_pause; // lock playing 19 extern int MP3_pause; // lock playing
20 /* informational: */ 20 /* informational: */
21 extern int MP3_filesize; // filesize 21 extern int MP3_filesize; // filesize
27 extern int MP3_channels; 27 extern int MP3_channels;
28 extern int MP3_bps; 28 extern int MP3_bps;
29 29
30 /* player level: */ 30 /* player level: */
31 extern int MP3_OpenDevice(char *devname); /* devname can be NULL for default) */ 31 extern int MP3_OpenDevice(char *devname); /* devname can be NULL for default) */
32 extern void MP3_Play(); 32 extern void MP3_Play(void);
33 extern void MP3_Stop(); 33 extern void MP3_Stop(void);
34 extern void MP3_CloseDevice(); 34 extern void MP3_CloseDevice(void);
35 35