]> git.draconx.ca Git - gob-dx.git/blobdiff - src/parse.y
Release 0.93.1
[gob-dx.git] / src / parse.y
index d0b56fe85679f1783dec67f2858fddcf61af6841..e204c6227780728857e8546c9ec17b14c7d9408c 100644 (file)
@@ -73,17 +73,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);
@@ -137,7 +137,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;
@@ -336,7 +336,7 @@ destructor:         TOKEN TOKEN     {
                        if(strcmp($<id>1, "destroywith")==0) {
                                g_free($<id>1);
                                destructor = $<id>2;
-                               destructor_line = ccode_line;
+                               destructor_line = line_no;
                                destructor_simple = TRUE;
                        } else {
                                g_free($<id>1);
@@ -455,7 +455,7 @@ argument:   ARGUMENT flags argtype TOKEN TOKEN '{' CCODE TOKEN '{' CCODE ';' {
                                                }
        |       ARGUMENT flags argtype TOKEN TOKEN {
                        Node *node;
-                       char *get, *set;
+                       char *get, *set = NULL;
                        Variable *var;
                        Type *type;
                        char *root;