Fix return types.

This commit is contained in:
joerg 2013-03-02 17:51:49 +00:00
parent 29d3e9bfe1
commit 8973b44b06
7 changed files with 163 additions and 13 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.13 2011/05/14 19:21:52 hans Exp $
$NetBSD: distinfo,v 1.14 2013/03/02 17:51:49 joerg Exp $
SHA1 (sp3f4.kit.tar.Z) = bded1e078d0acfef090117490a7ac8a57887f39e
RMD160 (sp3f4.kit.tar.Z) = 0bd293298c41791a9a452648f5c6a936175e220c
@ -15,15 +15,19 @@ SHA1 (patch-ai) = 7e94175896b98f17f43338a05ed993657d4cc844
SHA1 (patch-aj) = 6229e4066ab8bfba8b29bcc1260d75563637a784
SHA1 (patch-ak) = f7e630445f87514e58221e0e10ae17cb4b532849
SHA1 (patch-al) = 4b27e02d8e6c74cb2ba6608d86f58fda891c6735
SHA1 (patch-am) = f80ff5cc36abdf0780f87ecdacce73ccd4abd395
SHA1 (patch-am) = 5b7c21201393b6cb9f9b7a22560d7a55fb090c35
SHA1 (patch-an) = f0b06bf671f4370dedfe3693bfcd5461ddcccf24
SHA1 (patch-ao) = 6701fc535be7f3ab3d6287b42af7b15e63980189
SHA1 (patch-ap) = f82a0828c1c2681dc1df5e3de7a37cd042c0494f
SHA1 (patch-aq) = 87739a58999dc7027468ff46c04a65c75cf853e3
SHA1 (patch-ar) = 7bfa494147b26f7b330498d9c64ae66a79cebd27
SHA1 (patch-as) = 44d36eedbdb1c9c95886ce0e34417ff8fd3cb72d
SHA1 (patch-at) = d71bbc85a75c456f0b79ff95139699756e00c970
SHA1 (patch-at) = 6627f94e9b875c59c69ea85977b65011bbae0309
SHA1 (patch-au) = cd5094fc11e4928c5646926a27a2956c1c1ea77a
SHA1 (patch-av) = 9828210e621310023e059e4fc7f8f1c5d1c7e187
SHA1 (patch-aw) = 6bbc7e279d92def9ca90b5544b2777b7f221071a
SHA1 (patch-ax) = 44ba0f7d871a37d74a4ae47b673c6eb69e6a023a
SHA1 (patch-src_lib_fte_device.c) = 2a011e9fcacb2d10cbb4dd506c27bcc84b848cb9
SHA1 (patch-src_lib_fte_display.c) = ee0ed83b3b9ce6d881ffe021a904100259c38568
SHA1 (patch-src_lib_mfb_mfbbasic.c) = c2746f9d7dfd70c54df9d0648d3cd3d72e4defc4
SHA1 (patch-src_lib_mfb_mfbio.c) = 2e213828363c80c339585cc3afb5d9debc8aa579

View file

@ -1,6 +1,6 @@
$NetBSD: patch-am,v 1.2 2006/10/09 20:04:38 mlelstv Exp $
$NetBSD: patch-am,v 1.3 2013/03/02 17:51:49 joerg Exp $
--- src/lib/fte/x11.c.orig 1993-04-14 21:44:56.000000000 +0200
--- src/lib/fte/x11.c.orig 1993-04-14 19:44:56.000000000 +0000
+++ src/lib/fte/x11.c
@@ -12,6 +12,7 @@ Author: 1988 Jeffrey M. Hsu
#ifdef HAS_X11
@ -10,17 +10,41 @@ $NetBSD: patch-am,v 1.2 2006/10/09 20:04:38 mlelstv Exp $
# include "util.h"
@@ -62,6 +63,10 @@ typedef struct x11info {
@@ -39,7 +40,7 @@ extern int _Xdebug;
/* forward declarations */
extern void handlebuttonev(), handlekeypressed(), killwin(), hardcopy(),
redraw(), resize();
-int errorhandler();
+static void errorhandler(Display *display, XErrorEvent *errorev);
#define RAD_TO_DEG (180.0 / M_PI)
@@ -62,6 +63,12 @@ typedef struct x11info {
#define DEVDEP(g) (*((X11devdep *) (g)->devdep))
static void linear_arc( );
+static void initlinestyles( );
+static void initcolors( );
+static void X_ScreentoData( );
+
+static void slopelocation(GRAPH *graph, int x0, int y0);
+
static Display *display;
static GC xorgc;
static char *xlinestyles[NUMLINESTYLES] = { /* test patterns XXX */
@@ -145,10 +152,8 @@ X11_Init()
}
-int
-errorhandler(display, errorev)
-Display *display;
-XErrorEvent *errorev;
+static void
+errorhandler(Display *display, XErrorEvent *errorev)
{
XGetErrorText(display, errorev->error_code, ErrorMessage, 1024);
externalerror(ErrorMessage);
@@ -302,7 +307,7 @@ GRAPH *graph;
return (0);
}
@ -39,7 +63,29 @@ $NetBSD: patch-am,v 1.2 2006/10/09 20:04:38 mlelstv Exp $
initcolors(graph)
GRAPH *graph;
{
@@ -773,12 +778,15 @@ GRAPH *graph;
@@ -405,9 +410,7 @@ int x1, y1, x2, y2;
}
/*ARGSUSED*/
-X11_Arc(x0, y0, radius, theta1, theta2)
-int x0, y0, radius;
-double theta1, theta2;
+void X11_Arc(int x0, int y0, int radius, double theta1, double theta2)
{
int t1, t2;
@@ -612,9 +615,7 @@ caddr_t clientdata, calldata;
}
# endif
-slopelocation(graph, x0, y0)
-GRAPH *graph;
-int x0, y0; /* initial position of mouse */
+static void slopelocation(GRAPH *graph, int x0, int y0)
{
int x1, y1;
@@ -773,12 +774,15 @@ GRAPH *graph;
graph->commandline, fx0, fx1, fy0, fy1);
}
@ -55,7 +101,14 @@ $NetBSD: patch-am,v 1.2 2006/10/09 20:04:38 mlelstv Exp $
(void) cp_evloop(buf);
@@ -921,7 +929,8 @@ X11_Input(request, response)
@@ -915,13 +919,12 @@ static int inchar(fp)
}
# endif
-X11_Input(request, response)
- REQUEST *request;
- RESPONSE *response;
+void X11_Input(REQUEST *request, RESPONSE *response)
{
XEvent ev;
@ -65,7 +118,7 @@ $NetBSD: patch-am,v 1.2 2006/10/09 20:04:38 mlelstv Exp $
switch (request->option) {
case char_option:
@@ -938,14 +947,15 @@ X11_Input(request, response)
@@ -938,14 +941,15 @@ X11_Input(request, response)
XtDispatchEvent(&ev);
}
@ -85,7 +138,7 @@ $NetBSD: patch-am,v 1.2 2006/10/09 20:04:38 mlelstv Exp $
/* handle ALL X events */
while (XtPending()) {
XtNextEvent(&ev);
@@ -953,7 +963,7 @@ X11_Input(request, response)
@@ -953,7 +957,7 @@ X11_Input(request, response)
}
}
@ -94,7 +147,7 @@ $NetBSD: patch-am,v 1.2 2006/10/09 20:04:38 mlelstv Exp $
response->reply.ch = inchar(request->fp);
goto out;
}
@@ -995,10 +1005,11 @@ out:
@@ -995,10 +999,11 @@ out:
}

View file

@ -1,6 +1,6 @@
$NetBSD: patch-at,v 1.2 2011/05/14 18:45:54 hans Exp $
$NetBSD: patch-at,v 1.3 2013/03/02 17:51:49 joerg Exp $
--- src/lib/mfb/mfbgnc.c.orig 2005-12-16 16:27:15.000000000 +0000
--- src/lib/mfb/mfbgnc.c.orig 1991-04-10 02:08:26.000000000 +0000
+++ src/lib/mfb/mfbgnc.c
@@ -24,7 +24,7 @@ Author: -C- 1982 Giles C. Billingsley
#include "suffix.h"
@ -11,3 +11,13 @@ $NetBSD: patch-at,v 1.2 2011/05/14 18:45:54 hans Exp $
extern void ftime();
#endif
@@ -100,8 +100,7 @@ extern void ftime();
* all other characters are ``self-inserting''.
*/
-MFBGenCode(PM)
- char *PM;
+void MFBGenCode(char *PM)
{
#ifdef HAS_FTIME
struct timeb time1, time2;

View file

@ -0,0 +1,23 @@
$NetBSD: patch-src_lib_fte_device.c,v 1.1 2013/03/02 17:51:49 joerg Exp $
--- src/lib/fte/device.c.orig 2013-03-01 22:48:02.000000000 +0000
+++ src/lib/fte/device.c
@@ -14,6 +14,7 @@ Author: 1986 Wayne A. Christopher, U. C.
#include "ftedefs.h"
#include "dgen.h"
+static void com_alter_common(wordlist *wl, int do_model);
static wordlist *devexpand();
/*
@@ -576,9 +577,7 @@ com_altermod(wl)
com_alter_common(wl, 1);
}
-com_alter_common(wl, do_model)
- wordlist *wl;
- int do_model;
+static void com_alter_common(wordlist *wl, int do_model)
{
#ifdef notdef
struct variable var, *nv, *prev;

View file

@ -0,0 +1,19 @@
$NetBSD: patch-src_lib_fte_display.c,v 1.1 2013/03/02 17:51:49 joerg Exp $
--- src/lib/fte/display.c.orig 1993-04-25 21:50:26.000000000 +0000
+++ src/lib/fte/display.c
@@ -22,10 +22,11 @@ extern int X_Init(), X_NewViewport(), X
#ifdef HAS_X11
extern int X11_Init(), X11_NewViewport(), X11_Close(), X11_Clear(),
- X11_DrawLine(), X11_Arc(), X11_Text(), X11_DefineColor(),
+ X11_DrawLine(), X11_Text(), X11_DefineColor(),
X11_DefineLinestyle(), X11_SetLinestyle(), X11_SetColor(),
- X11_Update(),
- X11_Input();
+ X11_Update();
+void X11_Arc(int x0, int y0, int radius, double theta1, double theta2);
+void X11_Input(REQUEST *request, RESPONSE *response);
#endif
#ifdef HAS_MFB

View file

@ -0,0 +1,13 @@
$NetBSD: patch-src_lib_mfb_mfbbasic.c,v 1.1 2013/03/02 17:51:49 joerg Exp $
--- src/lib/mfb/mfbbasic.c.orig 2013-03-01 22:43:30.000000000 +0000
+++ src/lib/mfb/mfbbasic.c
@@ -27,6 +27,8 @@ Author: -C- 1982 Giles C. Billingsley
#define RadToDeg 57.29577951
#define MFBFORMAT MFBCurrent->strings
+void MFBGenCode(char *PM);
+
/* Here we take care of externs */
MFB *MFBCurrent;

View file

@ -0,0 +1,28 @@
$NetBSD: patch-src_lib_mfb_mfbio.c,v 1.1 2013/03/02 17:51:49 joerg Exp $
--- src/lib/mfb/mfbio.c.orig 2013-03-01 22:43:42.000000000 +0000
+++ src/lib/mfb/mfbio.c
@@ -21,8 +21,11 @@ Author: -C- 1982 Giles C. Billingsley
#include "spice.h"
#include "mfb.h"
+#include <string.h>
+#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
+#include <unistd.h>
#include "suffix.h"
#ifdef HAS_BSDTTY
@@ -62,9 +65,8 @@ Author: -C- 1982 Giles C. Billingsley
#endif
#endif
-/* Library routines */
-char *strcpy();
-extern void free();
+
+void MFBGenCode(char *PM);
static int MFBsaveflg = 0; /* used for kludgy ungetc */
static int Oldsaveflg = 0; /* ungetc for displays without keyboards */