~ubuntu-branches/ubuntu/quantal/gnutls26/quantal-security

« back to all changes in this revision

Viewing changes to doc/README.gaa

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2011-10-01 15:28:13 UTC
  • mfrom: (12.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20111001152813-yygm1c4cxonfxhzy
Tags: 2.12.11-1
* New upstream version.
  + Allow CA importing of 0 certificates to succeed. Closes: #640639
* Add libp11-kit-dev to libgnutls-dev dependencies. (see #643811)
* [20_guiledocstring.diff] guile: Fix docstring extraction with CPP 4.5+.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
If you modify src/*.gaa files you need to rebuild them using the 'gaa'
2
 
tool.  The last release, 1.6.6, contains some minor problems that
3
 
triggers warnings on the output C code.  The following patch against
4
 
gaa 1.6.6 is used to generate files stored in GnuTLS.
5
 
 
6
 
diff -ur gaa-1.6.6.orig/source/skel/gaa.skel gaa-1.6.6/source/skel/gaa.skel
7
 
--- gaa-1.6.6.orig/source/skel/gaa.skel 2004-04-15 13:32:29.000000000 +0200
8
 
+++ gaa-1.6.6/source/skel/gaa.skel      2008-11-13 10:52:23.000000000 +0100
9
 
@@ -340,31 +340,12 @@
10
 
     return tmp;
11
 
 }
12
 
 
13
 
-static char gaa_getchar(char *arg)
14
 
-{
15
 
-    if(strlen(arg) != 1)
16
 
-    {
17
 
-        printf("Option %s: '%s' isn't an character\n", gaa_current_option, arg);
18
 
-        GAAERROR(-1);
19
 
-    }
20
 
-    return arg[0];
21
 
-}
22
 
 
23
 
 static char* gaa_getstr(char *arg)
24
 
 {
25
 
     return arg;
26
 
 }
27
 
-static float gaa_getfloat(char *arg)
28
 
-{
29
 
-    float tmp;
30
 
-    char a;
31
 
-    if(sscanf(arg, "%f%c", &tmp, &a) < 1)
32
 
-    {
33
 
-        printf("Option %s: '%s' isn't a float number\n", gaa_current_option, arg);
34
 
-        GAAERROR(-1);
35
 
-    }
36
 
-    return tmp;
37
 
-}
38
 
+
39
 
 /* option structures */
40
 
 @         
41
 
 #line 349 "gaa.skel"
42
 
@@ -444,16 +425,19 @@
43
 
 int gaa(int argc, char **argv, gaainfo *gaaval)
44
 
 {
45
 
     int tmp1, tmp2;
46
 
-    int i, j@;
47
 
+    int l;
48
 
+    size_t i, j@;
49
 
     char *opt_list;
50
 
 
51
 
+    i = 0;
52
 
+
53
 
     GAAargv = argv;
54
 
     GAAargc = argc;
55
 
 
56
 
     opt_list = (char*) gaa_malloc(GAA_NB_OPTION + 1);
57
 
 
58
 
-    for(i = 0; i < GAA_NB_OPTION + 1; i++)
59
 
-        opt_list[i] = 0;
60
 
+    for(l = 0; l < GAA_NB_OPTION + 1; l++)
61
 
+        opt_list[l] = 0;
62
 
     /* initialization */
63
 
     if(inited == 0)
64
 
     {
65
 
@@ -468,27 +452,27 @@
66
 
       gaa_arg_used = gaa_malloc(argc * sizeof(char));
67
 
     }
68
 
 
69
 
-    for(i = 1; i < argc; i++)
70
 
-        gaa_arg_used[i] = 0;
71
 
-    for(i = 1; i < argc; i++)
72
 
+    for(l = 1; l < argc; l++)
73
 
+        gaa_arg_used[l] = 0;
74
 
+    for(l = 1; l < argc; l++)
75
 
     {
76
 
-        if(gaa_arg_used[i] == 0)
77
 
+        if(gaa_arg_used[l] == 0)
78
 
         {
79
 
             j = 0;
80
 
-            tmp1 = gaa_is_an_argument(GAAargv[i]);
81
 
+            tmp1 = gaa_is_an_argument(GAAargv[l]);
82
 
             switch(tmp1)
83
 
             {
84
 
             case GAA_WORD_OPTION:
85
 
                 j++;
86
 
             case GAA_LETTER_OPTION:
87
 
                 j++;
88
 
-                tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
89
 
+                tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
90
 
                 if(tmp2 == GAA_ERROR_NOMATCH)
91
 
                 {
92
 
-                    printf("Invalid option '%s'\n", argv[i]+j);
93
 
+                    printf("Invalid option '%s'\n", argv[l]+j);
94
 
                     return 0;
95
 
                 }
96
 
-                switch(gaa_try(tmp2, i+1, gaaval, opt_list))
97
 
+                switch(gaa_try(tmp2, l+1, gaaval, opt_list))
98
 
                 {
99
 
                 case GAA_ERROR_NOTENOUGH_ARGS:
100
 
                     printf("'%s': not enough arguments\n",gaa_current_option);
101
 
@@ -501,18 +485,18 @@
102
 
                 default:
103
 
                     printf("Unknown error\n");
104
 
                 }
105
 
-                gaa_arg_used[i] = 1;
106
 
+                gaa_arg_used[l] = 1;
107
 
                 break;
108
 
             case GAA_MULTIPLE_OPTION:
109
 
-                for(j = 1; j < strlen(argv[i]); j++)
110
 
+                for(j = 1; j < strlen(argv[l]); j++)
111
 
                 {
112
 
-                    tmp2 = gaa_get_option_num(argv[i]+j, tmp1);
113
 
+                    tmp2 = gaa_get_option_num(argv[l]+j, tmp1);
114
 
                     if(tmp2 == GAA_ERROR_NOMATCH)
115
 
                     {
116
 
-                        printf("Invalid option '%c'\n", *(argv[i]+j));
117
 
+                        printf("Invalid option '%c'\n", *(argv[l]+j));
118
 
                         return 0;
119
 
                     }
120
 
-                    switch(gaa_try(tmp2, i+1, gaaval, opt_list))
121
 
+                    switch(gaa_try(tmp2, l+1, gaaval, opt_list))
122
 
                     {
123
 
                     case GAA_ERROR_NOTENOUGH_ARGS:
124
 
                         printf("'%s': not enough arguments\n",gaa_current_option);
125
 
@@ -526,7 +510,7 @@
126
 
                         printf("Unknown error\n");
127
 
                     }
128
 
                 }
129
 
-                gaa_arg_used[i] = 1;
130
 
+                gaa_arg_used[l] = 1;
131
 
                 break;
132
 
             default: break;
133
 
             }
134
 
@@ -552,9 +536,9 @@
135
 
     }
136
 
 #endif
137
 
 }
138
 
-    for(i = 1; i < argc; i++)
139
 
+    for(l = 1; l < argc; l++)
140
 
     {
141
 
-        if(gaa_arg_used[i] == 0)
142
 
+        if(gaa_arg_used[l] == 0)
143
 
         {
144
 
             printf("Too many arguments\n");
145
 
             return 0;
146
 
@@ -605,7 +589,7 @@
147
 
 
148
 
         len++;
149
 
         a = fgetc( file);
150
 
-        if(a==EOF) return 0; //a = ' ';
151
 
+        if(a==EOF) return 0; /* a = ' '; */
152
 
     }
153
 
 
154
 
     len += 1;