comparison src/util.h @ 10414:26eac2362c32

[gaim-migrate @ 11664] I'm starting to feel better. Little change here, little change there. Mostly I added a function gaim_util_write_xml_file to be used to write our config files. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 25 Dec 2004 18:33:27 +0000
parents 8d42237564f6
children 5b7a74d397cc
comparison
equal deleted inserted replaced
10413:960b6a41d02f 10414:26eac2362c32
375 * @return 0 for success, nonzero on any error. 375 * @return 0 for success, nonzero on any error.
376 */ 376 */
377 int gaim_build_dir(const char *path, int mode); 377 int gaim_build_dir(const char *path, int mode);
378 378
379 /** 379 /**
380 * Write a null-terminated string of data to a file of the given name
381 * in the Gaim user directory ($HOME/.gaim by default). The data is
382 * typically a serialized version of one of Gaim's config files, such
383 * as prefs.xml, accounts.xml, etc. And the string is typically
384 * obtained using xmlnode_to_formatted_str.
385 *
386 * @param filename The basename of the file to write in the gaim_user_dir.
387 * @param data A null-terminated string of data to write.
388 *
389 * @return TRUE if the file was written successfully. FALSE otherwise.
390 */
391 gboolean gaim_util_write_xml_file(const char *filename, const char *data);
392
393 /**
380 * Creates a temporary file and returns a file pointer to it. 394 * Creates a temporary file and returns a file pointer to it.
381 * 395 *
382 * This is like mkstemp(), but returns a file pointer and uses a 396 * This is like mkstemp(), but returns a file pointer and uses a
383 * pre-set template. It uses the semantics of tempnam() for the 397 * pre-set template. It uses the semantics of tempnam() for the
384 * directory to use and allocates the space for the file path. 398 * directory to use and allocates the space for the file path.