Subversion Repositories filter_foundry

Rev

Rev 492 | Rev 498 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 492 Rev 496
Line 82... Line 82...
82
                        }else{
82
                        }else{
83
                                if(lineptr){
83
                                if(lineptr){
84
                                        /* it's not an empty line; append it to current expr string */
84
                                        /* it's not an empty line; append it to current expr string */
85
                                        if( q+lineptr > curexpr+MAXEXPR ){
85
                                        if( q+lineptr > curexpr+MAXEXPR ){
86
                                                // TODO: isn't the limit 1024?! (because we need to have the NUL too?)
86
                                                // TODO: isn't the limit 1024?! (because we need to have the NUL too?)
87
                                                *reason = FF_GetMsg_Cpy(MSG_EXPRESSION1024_FOUND_ID);
87
                                                *reason = FF_GetMsg_Cpy(MSG_EXPRESSION1024_FOUND_ID); // TODO: This leaks memory! Needs FF_GetMsg_Free()...
88
                                                break;
88
                                                break;
89
                                        }
89
                                        }
90
                                        q = cat(q,linebuf);
90
                                        q = cat(q,linebuf);
91
                                }else{
91
                                }else{
92
                                        /* it's an empty line: we've completed the expr string */
92
                                        /* it's an empty line: we've completed the expr string */
93
                                        if(expr[exprcnt])
93
                                        if(expr[exprcnt])
94
                                                free(expr[exprcnt]);
94
                                                free(expr[exprcnt]);
95
                                        *q = 0;
95
                                        *q = 0;
96
                                        if(!(expr[exprcnt] = my_strdup(curexpr))){
96
                                        if(!(expr[exprcnt] = my_strdup(curexpr))){
97
                                                *reason = FF_GetMsg_Cpy(MSG_EXPRESSION_OOM_ID);
97
                                                *reason = FF_GetMsg_Cpy(MSG_EXPRESSION_OOM_ID); // TODO: This leaks memory! Needs FF_GetMsg_Free()...
98
                                                break;
98
                                                break;
99
                                        }
99
                                        }
100
 
100
 
101
                                        if(++exprcnt == 4){
101
                                        if(++exprcnt == 4){
102
                                                res = true;
102
                                                res = true;
Line 349... Line 349...
349
                                }
349
                                }
350
                        }
350
                        }
351
                } // else no point in proceeding
351
                } // else no point in proceeding
352
                FSClose(refnum);
352
                FSClose(refnum);
353
        }else
353
        }else
354
                *reason = FF_GetMsg_Cpy(MSG_CANNOT_OPEN_FILE_ID);
354
                *reason = FF_GetMsg_Cpy(MSG_CANNOT_OPEN_FILE_ID); // TODO: This leaks memory! Needs FF_GetMsg_Free()...
355
 
355
 
356
        if (res) gdata->obfusc = false;
356
        if (res) gdata->obfusc = false;
357
        return res;
357
        return res;
358
}
358
}
359
 
359
 
Line 814... Line 814...
814
                        PIDISPOSEHANDLE(h);
814
                        PIDISPOSEHANDLE(h);
815
                }
815
                }
816
                FSClose(r);
816
                FSClose(r);
817
        }
817
        }
818
        else
818
        else
819
                *reason = FF_GetMsg_Cpy(MSG_CANNOT_OPEN_FILE_ID);
819
                *reason = FF_GetMsg_Cpy(MSG_CANNOT_OPEN_FILE_ID); // TODO: This leaks memory! Needs FF_GetMsg_Free()...
820
 
820
 
821
        return res;
821
        return res;
822
}
822
}