New functions.

* gstrfuncs.c (g_strccpy, g_strecpy): New functions.

	* glib.h: Declare and document them. Define the deprecated
	g_strescape as a macro that calls g_strecpy.

	* tests/strfunc-test.c (main): Test them.

	* makefile.{cygwin,msc}.in
	* tests/makefile.{cygwin,msc}.in: Remove gstack and its test
	program.

	* glib.def: Additions and removals.

	* README.win32: Improve gcc build instructions.

	* build-dll: Also build import library for MSVC.
This commit is contained in:
Tor Lillqvist
1999-07-31 21:45:21 +00:00
parent 87c7aeb93b
commit 1146c6fbb3
22 changed files with 535 additions and 74 deletions

View File

@@ -99,6 +99,17 @@ main (int argc,
g_assert (strcmp(string, "00021 test ") == 0);
g_free (string);
g_assert (strcmp(g_strccpy(g_malloc(100),
"abc\\\\\\\"\\b\\f\\n\\r\\t\\003\\177\\234\\313"),
"abc\\\"\b\f\n\r\t\003\177\234\313") == 0);
g_assert (strcmp(g_strecpy(g_malloc(100),
"abc\\\"\b\f\n\r\t\003\177\234\313",
NULL),
"abc\\\\\\\"\\b\\f\\n\\r\\t\\003\\177\\234\\313") == 0);
g_assert (strcmp(g_strecpy(g_malloc(100),"abc\\\"\b\f\n\r\t\003\177\234\313",
"\b\f\001\002\003\004"),
"abc\\\\\\\"\b\f\\n\\r\\t\003\\177\\234\\313") == 0);
return 0;
}