From 031db8b9c87e9f096a377547dfbf6266958fa6cd Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Sun, 2 Nov 2003 23:12:35 +0000 Subject: From Gisle Vanem: * Added a new function get_file_in_temp() to epan/filesystem.c. This because of asn1.dll plugin which had code to write to a log-file "c:\temp\ethereal.log". I feel this patch makes this safer; I don't even have a c:\temp dir. * Patched packet-asn1.c to use get_file_in_temp(). * Added some #undef to packet-snmp.c to silence gcc. * Changed "%u" -> "%lu" formats in util.c Rename get_file_in_temp() to get_tempfile_path() to match other function names. svn path=/trunk/; revision=8859 --- epan/filesystem.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'epan/filesystem.h') diff --git a/epan/filesystem.h b/epan/filesystem.h index a23a621684..d33d24e0c6 100644 --- a/epan/filesystem.h +++ b/epan/filesystem.h @@ -1,7 +1,7 @@ /* filesystem.h * Filesystem utility definitions * - * $Id: filesystem.h,v 1.13 2003/05/15 07:44:54 guy Exp $ + * $Id: filesystem.h,v 1.14 2003/11/02 23:12:34 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -111,6 +111,15 @@ int create_persconffile_dir(char **pf_dir_path_return); */ char *get_persconffile_path(const char *filename, gboolean for_writing); +/* + * Construct the path name of a file in $TMP/%TEMP% directory. + * Or "/tmp/" (C:\) if that fails. + * + * Return value is malloced so the caller should free it. + */ +char *get_tempfile_path(const char *filename); + + /* Delete a file */ gboolean deletefile (const char *path); #endif /* FILESYSTEM_H */ -- cgit v1.2.1