minor awk cleanup diff

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

minor awk cleanup diff

Antti Nykänen
Hello,

Here are some small cleanups for awk.

Index: lex.c
===================================================================
RCS file: /cvs/src/usr.bin/awk/lex.c,v
retrieving revision 1.8
diff -r1.8 lex.c
371c371,372
< int c, n;
---
> int c;
> unsigned int n;
Index: lib.c
===================================================================
RCS file: /cvs/src/usr.bin/awk/lib.c,v
retrieving revision 1.16
diff -r1.16 lib.c
33a34
> #include <math.h>
614c615
< void error()
---
> void error(void)
714d714
< #include <math.h>

Reply | Threaded
Open this post in threaded view
|

Re: minor awk cleanup diff

Antti Nykänen
...and here in diff -u as suggested. Sorry.


diff -ru awk~/lex.c awk/lex.c
--- awk~/lex.c Thu Dec 30 03:52:48 2004
+++ awk/lex.c Thu Mar  9 08:25:12 2006
@@ -368,7 +368,8 @@
 
 int string(void)
 {
- int c, n;
+ int c;
+ unsigned int n;
  char *s, *bp;
  static char *buf = 0;
  static int bufsz = 500;
diff -ru awk~/lib.c awk/lib.c
--- awk~/lib.c Wed Nov 23 04:43:45 2005
+++ awk/lib.c Wed Mar  8 15:11:07 2006
@@ -31,6 +31,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdarg.h>
+#include <math.h>
 #include "awk.h"
 #include "ytab.h"
 
@@ -611,7 +612,7 @@
  error();
 }
 
-void error()
+void error(void)
 {
  extern Node *curnode;
 
@@ -711,7 +712,6 @@
 /* appears to be broken in gcc on linux: thinks 0x123 is a valid FP number */
 /* wrong: violates 4.10.1.4 of ansi C standard */
 
-#include <math.h>
 int is_number(const char *s)
 {
  double r;