Alexandre Julliard : wpp: Get rid of wpp_parse_temp, temp file management is better left to callers.
Alexandre Julliard
julliard at winehq.org
Tue Mar 30 10:39:46 CDT 2010
Module: wine
Branch: master
Commit: bd94f959388d6027dc72210a56f14d6400b74a11
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bd94f959388d6027dc72210a56f14d6400b74a11
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Mar 30 15:34:29 2010 +0200
wpp: Get rid of wpp_parse_temp, temp file management is better left to callers.
---
include/wine/wpp.h | 1 -
libs/wpp/wpp.c | 37 -------------------------------------
2 files changed, 0 insertions(+), 38 deletions(-)
diff --git a/include/wine/wpp.h b/include/wine/wpp.h
index daba277..2d284f1 100644
--- a/include/wine/wpp.h
+++ b/include/wine/wpp.h
@@ -57,7 +57,6 @@ extern void wpp_set_pedantic( int on );
extern int wpp_add_include_path( const char *path );
extern char *wpp_find_include( const char *name, const char *parent_name );
extern int wpp_parse( const char *input, FILE *output );
-extern int wpp_parse_temp( const char *input, const char *output_base, char **output_name );
extern void wpp_set_callbacks( const struct wpp_callbacks *callbacks );
#endif /* __WINE_WPP_H */
diff --git a/libs/wpp/wpp.c b/libs/wpp/wpp.c
index de4286f..582ad6f 100644
--- a/libs/wpp/wpp.c
+++ b/libs/wpp/wpp.c
@@ -203,43 +203,6 @@ int wpp_parse( const char *input, FILE *output )
}
-/* parse into a temporary file */
-int wpp_parse_temp( const char *input, const char *output_base, char **output_name )
-{
- FILE *output;
- int ret, fd;
- char *temp_name;
-
- if (!output_base || !output_base[0]) output_base = "wpptmp";
-
- temp_name = pp_xmalloc( strlen(output_base) + 8 );
- if(!temp_name)
- return 1;
- strcpy( temp_name, output_base );
- strcat( temp_name, ".XXXXXX" );
-
- if((fd = mkstemps( temp_name, 0 )) == -1)
- {
- ppy_error("Could not generate a temp name from %s\n", temp_name);
- free( temp_name );
- return 2;
- }
-
- if (!(output = fdopen(fd, "wt")))
- {
- ppy_error("Could not open fd %s for writing\n", temp_name);
- close( fd );
- unlink( temp_name );
- free( temp_name );
- return 2;
- }
-
- *output_name = temp_name;
- ret = wpp_parse( input, output );
- fclose( output );
- return ret;
-}
-
void wpp_set_callbacks( const struct wpp_callbacks *callbacks )
{
wpp_callbacks = callbacks;
More information about the wine-cvs
mailing list