summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrlar <rlar>2016-02-28 20:11:49 +0100
committerWill Estes <westes575@gmail.com>2016-02-29 20:07:58 -0500
commit967819769eab880caa9aaf3a13605b0516e44b06 (patch)
tree82d7bd7734f53949bd228b0a9f7b57f4620d556c /src
parentb7b97894692b14b7ee1a1e908d7d3a4ddc57cee7 (diff)
ndinstal(), char *, to get rid of casts and warnings
Diffstat (limited to 'src')
-rw-r--r--src/flexdef.h2
-rw-r--r--src/scan.l6
-rw-r--r--src/sym.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/flexdef.h b/src/flexdef.h
index d879d92..0b96664 100644
--- a/src/flexdef.h
+++ b/src/flexdef.h
@@ -996,7 +996,7 @@ extern void cclinstal(char[], int);
/* Lookup the number associated with character class. */
extern int ccllookup(char[]);
-extern void ndinstal(const char *, unsigned char[]); /* install a name definition */
+extern void ndinstal(const char *, char[]); /* install a name definition */
extern unsigned char *ndlookup(const char *); /* lookup a name definition */
/* Increase maximum number of SC's. */
diff --git a/src/scan.l b/src/scan.l
index 7b8215c..5314268 100644
--- a/src/scan.l
+++ b/src/scan.l
@@ -135,7 +135,7 @@ M4QEND "]]"
int doing_codeblock = false;
int i, brace_depth=0, brace_start_line=0;
- unsigned char nmdef[MAXLINE];
+ char nmdef[MAXLINE];
<INITIAL>{
@@ -293,7 +293,7 @@ M4QEND "]]"
{NOT_WS}[^\r\n]* {
if(yyleng < MAXLINE)
{
- strcpy( (char *) nmdef, yytext );
+ strcpy( nmdef, yytext );
}
else
{
@@ -301,7 +301,7 @@ M4QEND "]]"
FLEX_EXIT(EXIT_FAILURE);
}
/* Skip trailing whitespace. */
- for ( i = strlen( (char *) nmdef ) - 1;
+ for ( i = strlen( nmdef ) - 1;
i >= 0 && (nmdef[i] == ' ' || nmdef[i] == '\t');
--i )
;
diff --git a/src/sym.c b/src/sym.c
index 97386eb..8eb51cc 100644
--- a/src/sym.c
+++ b/src/sym.c
@@ -174,7 +174,7 @@ static int hashfunct (const char *str, int hash_size)
/* ndinstal - install a name definition */
-void ndinstal (const char *name, unsigned char definition[])
+void ndinstal (const char *name, char definition[])
{
if (addsym (xstrdup(name),