summaryrefslogtreecommitdiff
path: root/src/tls_test-gaa.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2004-01-06 20:36:18 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2004-01-06 20:36:18 +0000
commit22a8db8a5ec20001742af1a00acd970665dceeaf (patch)
treecb54ad43fe625106004248eea2aa6a24eb0b9ff0 /src/tls_test-gaa.c
parent1db0788f59187bd5fa1676ddd1e22a3ad94e7df4 (diff)
downloadgnutls-22a8db8a5ec20001742af1a00acd970665dceeaf.tar.gz
Several bug fixes and cleanups by Arne Thomassen.
Diffstat (limited to 'src/tls_test-gaa.c')
-rw-r--r--src/tls_test-gaa.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/tls_test-gaa.c b/src/tls_test-gaa.c
index ec5fc2acb0..f9fd4f2488 100644
--- a/src/tls_test-gaa.c
+++ b/src/tls_test-gaa.c
@@ -1,4 +1,4 @@
-/* File generated by GAA 1.6.2
+/* File generated by GAA 1.6.5
*/
#define GAA_NO_WIN32
#line 1 "tls_test.gaa"
@@ -681,7 +681,8 @@ typedef struct gaastrnode gaa_str_node;
int gaa_internal_get_next_str(FILE *file, gaa_str_node *tmp_str, int argc)
{
int pos_ini;
- char a;
+ int a;
+ char ca;
int i = 0, len = 0, newline = 0;
if(argc == 1) {
@@ -689,7 +690,8 @@ int gaa_internal_get_next_str(FILE *file, gaa_str_node *tmp_str, int argc)
len = 2;
}
- if(fscanf(file,"%c", &a) != 1) return 0;
+ a = fgetc( file);
+ if (a == EOF) return 0;
while(a == ' ' || a == 9 || a == '\n')
{
@@ -698,7 +700,8 @@ int gaa_internal_get_next_str(FILE *file, gaa_str_node *tmp_str, int argc)
newline=1;
len = 2;
}
- if(fscanf(file,"%c", &a) != 1) return 0;
+ a = fgetc( file);
+ if (a == EOF) return 0;
}
pos_ini = ftell(file) - 1;
@@ -707,7 +710,8 @@ int gaa_internal_get_next_str(FILE *file, gaa_str_node *tmp_str, int argc)
{
len++;
- if(fscanf(file,"%c", &a) != 1) a = ' ';
+ a = fgetc( file);
+ if(a==EOF) return 0; //a = ' ';
}
len += 1;
@@ -727,11 +731,12 @@ int gaa_internal_get_next_str(FILE *file, gaa_str_node *tmp_str, int argc)
fseek(file,pos_ini, SEEK_SET);
do
{
- if(fscanf(file, "%c", &a) != 1)
+ if(fscanf(file, "%c", &ca) != 1)
{
i+=2;
break;
}
+ a = ca;
tmp_str->str[i] = a;
i++;
}
@@ -758,7 +763,7 @@ int gaa_file(char *name, gaainfo *gaaval)
if((file = fopen(name, "r")) == NULL)
{
printf("Couldn't open '%s' configuration file for reading\n", name);
- return 0;
+ return 1;
}
tmp_str = &first_str;