comparison osdep/getch2.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 11459d1ff17c
children 5385740067a1
comparison
equal deleted inserted replaced
17565:dc65faaadb04 17566:f580a7755ac5
7 7
8 /* Termcap code to erase to end of line */ 8 /* Termcap code to erase to end of line */
9 extern char * erase_to_end_of_line; 9 extern char * erase_to_end_of_line;
10 10
11 /* Get screen-size using IOCTL call. */ 11 /* Get screen-size using IOCTL call. */
12 extern void get_screen_size(); 12 extern void get_screen_size(void);
13 13
14 /* Load key definitions from the TERMCAP database. 'termtype' can be NULL */ 14 /* Load key definitions from the TERMCAP database. 'termtype' can be NULL */
15 extern int load_termcap(char *termtype); 15 extern int load_termcap(char *termtype);
16 16
17 /* Enable and disable STDIN line-buffering */ 17 /* Enable and disable STDIN line-buffering */
18 extern void getch2_enable(); 18 extern void getch2_enable(void);
19 extern void getch2_disable(); 19 extern void getch2_disable(void);
20 20
21 /* Read a character or a special key code (see keycodes.h) */ 21 /* Read a character or a special key code (see keycodes.h) */
22 extern int getch2(int halfdelay_time); 22 extern int getch2(int halfdelay_time);
23 23