diff options
author | Gerald Combs <gerald@wireshark.org> | 2003-11-02 23:12:35 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2003-11-02 23:12:35 +0000 |
commit | 031db8b9c87e9f096a377547dfbf6266958fa6cd (patch) | |
tree | b9ceb9b8cc87f48bc800f3b66eb28fb37398cb09 /epan/filesystem.h | |
parent | b8d155186ccf09f303c0f7196f09484bf6c9a674 (diff) | |
download | wireshark-031db8b9c87e9f096a377547dfbf6266958fa6cd.tar.gz |
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
Diffstat (limited to 'epan/filesystem.h')
-rw-r--r-- | epan/filesystem.h | 11 |
1 files changed, 10 insertions, 1 deletions
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 <gerald@ethereal.com> @@ -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/<filename>" (C:\<filename>) 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 */ |