56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
$OpenBSD: patch-compare_c,v 1.1 2005/09/05 13:25:04 espie Exp $
|
|
--- compare.c.orig Mon Feb 5 21:17:15 1990
|
|
+++ compare.c Mon Sep 5 15:21:26 2005
|
|
@@ -17,12 +17,15 @@ static char rcsid[]= "$Header: compare.c
|
|
#include "token.h"
|
|
#include "line.h"
|
|
#include "float.h"
|
|
-#include "compare.h"
|
|
|
|
#include <ctype.h>
|
|
|
|
-X_com(a,b,flags)
|
|
-int a,b,flags;
|
|
+static int _X_cmptokens(K_token p1,K_token p2,int flags);
|
|
+static int _X_strcmp(char *s1, char *s2, int flags);
|
|
+static int _X_floatdiff(F_float p1,F_float p2,T_tol the_tol);
|
|
+
|
|
+int
|
|
+X_com(int a, int b, int flags)
|
|
{
|
|
K_token atmp,btmp;
|
|
|
|
@@ -47,9 +50,7 @@ int a,b,flags;
|
|
** same as strcmp() except that case can be optionally ignored
|
|
*/
|
|
static int
|
|
-_X_strcmp(s1,s2,flags)
|
|
-char *s1,*s2;
|
|
-int flags;
|
|
+_X_strcmp(char *s1, char *s2, int flags)
|
|
{
|
|
if (flags & U_NO_CASE)
|
|
{
|
|
@@ -84,9 +85,7 @@ int flags;
|
|
** routine to compare two tokens
|
|
*/
|
|
static int
|
|
-_X_cmptokens(p1,p2,flags)
|
|
-K_token p1, p2;
|
|
-int flags;
|
|
+_X_cmptokens(K_token p1,K_token p2,int flags)
|
|
{
|
|
if (K_gettype(p1) != K_gettype(p2))
|
|
{
|
|
@@ -114,9 +113,7 @@ int flags;
|
|
** compare two F_floats using a tolerance
|
|
*/
|
|
static int
|
|
-_X_floatdiff(p1,p2,the_tol)
|
|
-F_float p1,p2;
|
|
-T_tol the_tol;
|
|
+_X_floatdiff(F_float p1,F_float p2,T_tol the_tol)
|
|
{
|
|
F_float diff, float_tmp;
|
|
T_tol tol_tmp;
|