[BACK]Return to patch-src_eparse.y CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / emulators / ski / patches

File: [cvs.NetBSD.org] / pkgsrc / emulators / ski / patches / patch-src_eparse.y (download)

Revision 1.1, Sun Aug 14 18:27:05 2016 UTC (23 months, 1 week ago) by scole
Branch: MAIN
CVS Tags: pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-, HEAD

Fixes so ski will actually run on NetBSD, add options.mk for motif/x11 versions

$NetBSD: patch-src_eparse.y,v 1.1 2016/08/14 18:27:05 scole Exp $

Rename strtonum to strtonumber so will not get errors about duplicate functions.

--- src/eparse.y.orig	2008-02-04 23:11:38.000000000 -0500
+++ src/eparse.y	2016-04-17 13:31:45.000000000 -0400
@@ -34,7 +34,7 @@
 extern int yylex (void );
 static REG convert(char);
 static REG rd8(REG);
-static REG strtonum(char *, int);
+static REG strtonumber(char *, int);
 static void yyerror(char *);
 
 %}
@@ -164,18 +164,18 @@
         ;
 
 count   : based
-        | NOBASE                { $$ = strtonum($1, 10); }
+        | NOBASE                { $$ = strtonumber($1, 10); }
         ;
 
 number  : based
-        | NOBASE                { $$ = strtonum($1, 16); }
-        | NPFXHEX               { $$ = strtonum($1, 16); }
+        | NOBASE                { $$ = strtonumber($1, 16); }
+        | NPFXHEX               { $$ = strtonumber($1, 16); }
         ;
 
-based   : BIN                   { $$ = strtonum($1, 2); }
-        | OCT                   { $$ = strtonum($1, 8); }
-        | DEC                   { $$ = strtonum($1, 10); }
-        | HEX                   { $$ = strtonum($1, 16); }
+based   : BIN                   { $$ = strtonumber($1, 2); }
+        | OCT                   { $$ = strtonumber($1, 8); }
+        | DEC                   { $$ = strtonumber($1, 10); }
+        | HEX                   { $$ = strtonumber($1, 16); }
         ;
 
 %%
@@ -197,7 +197,7 @@
     return memMRd(0, addr, 8, &dval) ? dval : 0;
 }
 
-static REG strtonum(char *str, int base)
+static REG strtonumber(char *str, int base)
 {
     REG num = 0;