summaryrefslogtreecommitdiff
path: root/graphics/tgd/files/patch-ad
blob: 50e008722fd82668b2ce05df703d25cd7b683128 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- tgdcommand.c.orig	Sat Apr  3 11:38:42 1999
+++ tgdcommand.c	Sat Apr  3 12:12:23 1999
@@ -8,6 +8,12 @@
  */
  
 #include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include "gd.h"
+#include "tgd.h"
+#include "tgdcommand.h"
+#include "tgdgd.h"
  
 static char SCCS[] = "@(#)tgdcommand.c	1.4 10/5/95 tgd";
 
@@ -170,6 +176,7 @@
 
 	strcat( buf, " is not a known command" );
 	die( buf );
+	return 0; /* turn off compiler warning */
 }
 
 /* --
@@ -184,6 +191,7 @@
 		if ( cmd->id == id )
 			return cmd;
 	die( "command not found" );  /* XXX return NULL ? */
+	return 0; /* turn off compiler warning */
 }
 
 /* --
@@ -205,7 +213,7 @@
 	CMD *cmd;
 
 	if ( cmd_id == TGDBLANKLINE )
-		return;
+		return 0; /* potential bug: value should be ignored */
 	/* one character in argcheck for each argument */
 	cmd = cmdbyid( cmd_id );
 	for ( s = cmd->argcheck, count = 0; *s; s++, count++ ) {
@@ -250,7 +258,7 @@
 /* --
  *  Find the routine to handle the command.
  */
-tgdcommand( argc, argv )
+void tgdcommand( argc, argv )
 int argc;
 char *argv[];
 {