From c7bed1298fabe93c08b2bf732d817f770cd0a88e Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Wed, 17 Oct 2007 21:25:16 +0000 Subject: s/fopen()/eth_fopen()/ in plugins/ (for bug 1827). svn path=/trunk/; revision=23221 --- plugins/mate/mate_grammar.lemon | 5 +++-- plugins/mate/mate_parser.l | 6 ++++-- plugins/wimaxasncp/wimaxasncp_dict.l | 4 +++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/mate/mate_grammar.lemon b/plugins/mate/mate_grammar.lemon index d57e109aac..5411d7d8e6 100644 --- a/plugins/mate/mate_grammar.lemon +++ b/plugins/mate/mate_grammar.lemon @@ -29,6 +29,7 @@ #include "mate.h" #include "mate_grammar.h" #include +#include #define DUMMY void* @@ -264,8 +265,8 @@ decl ::= DONE_KW SEMICOLON. debug_decl ::= DEBUG_KW OPEN_BRACE dbgfile_default dbglevel_default pdu_dbglevel_default gop_dbglevel_default gog_dbglevel_default CLOSE_BRACE SEMICOLON. -dbgfile_default ::= FILENAME_KW QUOTED(Filename) SEMICOLON. { mc->dbg_facility = fopen(Filename,"w"); if (mc->dbg_facility == NULL) report_open_failure(Filename,errno,TRUE); } -dbgfile_default ::= FILENAME_KW NAME(Filename) SEMICOLON. { mc->dbg_facility = fopen(Filename,"w"); if (mc->dbg_facility == NULL) report_open_failure(Filename,errno,TRUE); } +dbgfile_default ::= FILENAME_KW QUOTED(Filename) SEMICOLON. { mc->dbg_facility = eth_fopen(Filename,"w"); if (mc->dbg_facility == NULL) report_open_failure(Filename,errno,TRUE); } +dbgfile_default ::= FILENAME_KW NAME(Filename) SEMICOLON. { mc->dbg_facility = eth_fopen(Filename,"w"); if (mc->dbg_facility == NULL) report_open_failure(Filename,errno,TRUE); } dbgfile_default ::= . dbglevel_default ::= LEVEL_KW INTEGER(LevelString) SEMICOLON. { mc->dbg_lvl = (int) strtol(LevelString,NULL,10); } diff --git a/plugins/mate/mate_parser.l b/plugins/mate/mate_parser.l index 7d99afcf11..ca3a5ff3a7 100644 --- a/plugins/mate/mate_parser.l +++ b/plugins/mate/mate_parser.l @@ -47,6 +47,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include + #include "mate.h" #include "mate_grammar.h" #include "mate_parser_lex.h" @@ -159,7 +161,7 @@ blk_cmnt_stop "*/" g_error("dtd_preparse: include files nested to deeply"); include_stack[include_stack_ptr++] = YY_CURRENT_BUFFER; - yyin = fopen( yytext, "r" ); + yyin = eth_fopen( yytext, "r" ); if (!yyin) { yy_delete_buffer( YY_CURRENT_BUFFER ); @@ -275,7 +277,7 @@ extern gboolean mate_load_config(const gchar* filename, mate_config* matecfg) { volatile gboolean state = TRUE; mc = matecfg; - yyin = fopen(filename,"r"); + yyin = eth_fopen(filename,"r"); if (!yyin) { g_string_sprintfa(mc->config_error,"Mate parser: Could not open file: '%s', error: %s", filename, strerror(errno) ); diff --git a/plugins/wimaxasncp/wimaxasncp_dict.l b/plugins/wimaxasncp/wimaxasncp_dict.l index 3be6a524ee..8f63dfa3e8 100644 --- a/plugins/wimaxasncp/wimaxasncp_dict.l +++ b/plugins/wimaxasncp/wimaxasncp_dict.l @@ -70,6 +70,8 @@ #include #include #include /* array_length */ +#include + #include "wimaxasncp_dict.h" #include "wimaxasncp_dict_lex.h" @@ -579,7 +581,7 @@ static FILE *wimaxasncp_dict_open( fname = g_strdup(filename); } - fh = fopen(fname,"r"); + fh = eth_fopen(fname,"r"); D(("fname: %s fh: %p\n",fname,fh)); -- cgit v1.2.3