X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/3b10bbd3a88d6e16146414d91d06bb2f36347bfc..5b42e9400440d86723a27747b2191ab8cd59c2ee:/src/parse.c diff --git a/src/parse.c b/src/parse.c index 4e7592d..3eeb82b 100644 --- a/src/parse.c +++ b/src/parse.c @@ -95,17 +95,17 @@ yyerror(char *str) if(strcmp(yytext,"\n")==0) { out=g_strconcat("Error: ",str," before newline",NULL); } else if(yytext[0]=='\0') { - out=g_strconcat("Error: ",str," at end of input",NULL); + out=g_strconcat("Error: ", str, " at end of input", NULL); } else { char *tmp = g_strdup(yytext); - while((p=strchr(tmp,'\n'))) + while((p=strchr(tmp, '\n'))) *p='.'; - out=g_strconcat("Error: ",str," before '",tmp,"'",NULL); + out=g_strconcat("Error: ", str, " before '", tmp, "'", NULL); g_free(tmp); } - fprintf(stderr,"%s:%d: %s\n",filename,line_no,out); + fprintf(stderr, "%s:%d: %s\n", filename, line_no, out); g_free(out); exit(1); @@ -159,7 +159,7 @@ push_function(int scope, int method, char *oid, char *id, char *onerror, strcmp(gtktypes->next->data,"NONE")==0)) { print_error(TRUE, _("The number of GTK arguments and " "function arguments for a signal " - "don't seem to match"),line_no); + "don't seem to match"), line_no); } if(cbuf) { char *p; @@ -1272,7 +1272,7 @@ case 25: if(strcmp(yyvsp[-1].id, "destroywith")==0) { g_free(yyvsp[-1].id); destructor = yyvsp[0].id; - destructor_line = ccode_line; + destructor_line = line_no; destructor_simple = TRUE; } else { g_free(yyvsp[-1].id); @@ -1422,7 +1422,7 @@ case 38: #line 456 "parse.y" { Node *node; - char *get, *set; + char *get, *set = NULL; Variable *var; Type *type; char *root;