summaryrefslogtreecommitdiff
path: root/devel/frink/files/patch-output.c
blob: 81f4efd84a0c5c5f44375814b3d7441b651e479f (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--- output.c.orig	2002-12-11 23:05:16 UTC
+++ output.c
@@ -43,10 +43,10 @@ static int olead	= 0;		/* number of spaces wanted at s
 
 static TokenType olast	= HEAD;
 
-static Token nlToken	= {BLANK, CNSTWORD, 0, (char *) 0, 0, (Token *) 0, (Token *) 0};
-static Token startToken	= {START, CNSTWORD, 0, (char *) 0, 0, (Token *) 0, (Token *) 0};
-static Token contToken	= {CONT, CNSTWORD, 0, (char *) 0, 0, (Token *) 0, (Token *) 0};
-static Token spToken	= {SP, CNSTWORD, 0, " ", 1, (Token *) 0, (Token *) 0};
+static Token nlToken	= {.type = BLANK, .ckind = CNSTWORD};
+static Token startToken	= {.type = START, .ckind = CNSTWORD};
+static Token contToken	= {.type = CONT, .ckind = CNSTWORD};
+static Token spToken	= {.type = SP, .ckind = CNSTWORD, .text = " ", .length = 1};
 
 void initOutput(void)
 {
@@ -226,7 +226,7 @@ static void termline(void)
     }
 }
 
-static void printkn(char *txt, int length, int keepnl)
+static void printkn(const char *txt, int length, int keepnl)
 {
     char *cp;
     int l;
@@ -251,7 +251,7 @@ static void printkn(char *txt, int length, int keepnl)
     }
 }
 
-static void printn(char *txt, int len)
+static void printn(const char *txt, int len)
 {
     if (!testonly)
     {
@@ -259,12 +259,12 @@ static void printn(char *txt, int len)
     }
 }
 
-static void print(char *txt)
+static void print(const char *txt)
 {
     printn(txt, strlen(txt));
 }
 
-static void brace(char *t)
+static void brace(const char *t)
 {
     char *cp, *bp;
     while ((cp = strpbrk(t, "{}")) != (char *) 0)
@@ -377,10 +377,10 @@ static void putString(Token *seq)
     if (qts) { printn("\"", 1); }
 }
 
-static Token dollarToken = {DOLLAR, CNSTWORD, 0, (char *) 0, 0, (Token *) 0, (Token *) 0};
-static Token endlineToken = {ENDLINE, CNSTWORD, 0, (char *) 0, 0, (Token *) 0, (Token *) 0};
-static Token lbrackToken = {LBRACK, CNSTWORD, 0, (char *) 0, 0, (Token *) 0, (Token *) 0};
-static Token rbrackToken = {RBRACK, CNSTWORD, 0, (char *) 0, 0, (Token *) 0, (Token *) 0};
+static Token dollarToken = {.type = DOLLAR, .ckind = CNSTWORD};
+static Token endlineToken = {.type = ENDLINE, .ckind = CNSTWORD};
+static Token lbrackToken = {.type = LBRACK, .ckind = CNSTWORD};
+static Token rbrackToken = {.type = RBRACK, .ckind = CNSTWORD};
 
 void output(Token *token, int compress)
 {