a3dfc1076f
gcc45. - avoid implicit int, declare void functions void - return values from non-void functions - put most external declarations properly in header files - use some static and const - fix up a big mess with function pointer casting - use standard includes, don't provide own decls of standard functions - use types matching libc when providing own malloc, printf, and putchar - use <ctype.h> functions correctly - silence assorted compiler warnings - fix some bugs exposed by compiler warnings - don't intentionally exercise signed overflow - remove some unused items - add patch comments to other patch (patch-aa) As this includes several fixes and removes some undefined behavior on a commonly reachable code path, bump PKGREVISION.
36 lines
1.2 KiB
Text
36 lines
1.2 KiB
Text
$NetBSD: patch-ex__vis_h,v 1.1 2012/12/28 03:03:09 dholland Exp $
|
|
|
|
- use const for string constants
|
|
- declare void functions void
|
|
- remove stray extra copies of function declarations from elsewhere
|
|
|
|
--- ex_vis.h~ 2012-12-27 21:58:42.000000000 +0000
|
|
+++ ex_vis.h
|
|
@@ -300,8 +300,8 @@ var bool lasthad; /* Last command had a
|
|
var short lastvgk; /* Previous input key, if not from keyboard */
|
|
var short lastreg; /* Register with last command */
|
|
var char *ncols['z'-'a'+2]; /* Cursor positions of marks */
|
|
-var char *notenam; /* Name to be noted with change count */
|
|
-var char *notesgn; /* Change count from last command */
|
|
+var const char *notenam; /* Name to be noted with change count */
|
|
+var const char *notesgn; /* Change count from last command */
|
|
var char op; /* Operation of current command */
|
|
var short Peekkey; /* Peek ahead key */
|
|
var bool rubble; /* Line is filthy (in hardcopy open), redraw! */
|
|
@@ -333,13 +333,7 @@ var cell workcmd[5]; /* Temporary for la
|
|
/*
|
|
* Function types
|
|
*/
|
|
-int beep();
|
|
-int qcount();
|
|
-int vchange();
|
|
-int vdelete();
|
|
+void beep(void);
|
|
int vgrabit();
|
|
-int vinschar();
|
|
-int vmove();
|
|
-int vputchar();
|
|
-int vshift();
|
|
-int vyankit();
|
|
+
|
|
+
|