[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS libidn/examples
From: |
libidn-commit |
Subject: |
CVS libidn/examples |
Date: |
Sat, 02 Oct 2004 21:41:11 +0200 |
Update of /home/cvs/libidn/examples
In directory dopio:/tmp/cvs-serv2907
Modified Files:
example.c example3.c example4.c example5.c
Log Message:
Use *strerror.
--- /home/cvs/libidn/examples/example.c 2004/07/09 13:10:01 1.2
+++ /home/cvs/libidn/examples/example.c 2004/10/02 19:41:10 1.3
@@ -1,4 +1,4 @@
-/* example.c Example code showing how to use stringprep().
+/* example.c --- Example code showing how to use stringprep().
* Copyright (C) 2002, 2003, 2004 Simon Josefsson
*
* This file is part of GNU Libidn.
@@ -73,7 +73,7 @@
rc = stringprep (buf, BUFSIZ, 0, stringprep_nameprep);
if (rc != STRINGPREP_OK)
- printf ("Stringprep failed with rc %d...\n", rc);
+ printf ("Stringprep failed (%d): %s\n", rc, stringprep_strerror (rc));
else
{
printf ("After stringprep (length %d): ", strlen (buf));
--- /home/cvs/libidn/examples/example3.c 2004/07/09 13:10:01 1.3
+++ /home/cvs/libidn/examples/example3.c 2004/10/02 19:41:10 1.4
@@ -1,4 +1,4 @@
-/* example3.c Example ToASCII() code showing how to use Libidn.
+/* example3.c --- Example ToASCII() code showing how to use Libidn.
* Copyright (C) 2002, 2003, 2004 Simon Josefsson
*
* This file is part of GNU Libidn.
@@ -62,7 +62,7 @@
rc = idna_to_ascii_lz (buf, &p, 0);
if (rc != IDNA_SUCCESS)
{
- printf ("ToASCII() failed... %d\n", rc);
+ printf ("ToASCII() failed (%d): %s\n", rc, idna_strerror (rc));
exit (1);
}
--- /home/cvs/libidn/examples/example4.c 2004/07/09 13:10:01 1.3
+++ /home/cvs/libidn/examples/example4.c 2004/10/02 19:41:10 1.4
@@ -1,4 +1,4 @@
-/* example4.c Example ToUnicode() code showing how to use Libidn.
+/* example4.c --- Example ToUnicode() code showing how to use Libidn.
* Copyright (C) 2002, 2003, 2004 Simon Josefsson
*
* This file is part of GNU Libidn.
@@ -62,7 +62,7 @@
rc = idna_to_unicode_lzlz (buf, &p, 0);
if (rc != IDNA_SUCCESS)
{
- printf ("ToUnicode() failed... %d\n", rc);
+ printf ("ToUnicode() failed (%d): %s\n", rc, idna_strerror (rc));
exit (1);
}
--- /home/cvs/libidn/examples/example5.c 2004/02/10 22:35:47 1.2
+++ /home/cvs/libidn/examples/example5.c 2004/10/02 19:41:10 1.3
@@ -83,7 +83,7 @@
rc = idna_to_ascii_8z (buf, &p, 0);
if (rc != IDNA_SUCCESS)
{
- printf ("idna_to_ascii_8z failed (%d)...\n", rc);
+ printf ("idna_to_ascii_8z failed (%d): %s\n", rc, idna_strerror (rc));
return 2;
}
@@ -93,7 +93,8 @@
free (p);
if (rc != IDNA_SUCCESS)
{
- printf ("idna_to_unicode_8z4z failed (%d)...\n", rc);
+ printf ("idna_to_unicode_8z4z failed (%d): %s\n",
+ rc, idna_strerror (rc));
return 2;
}
@@ -111,7 +112,7 @@
}
else if (rc != TLD_SUCCESS)
{
- printf ("tld_check_4z() failed... %d\n", rc);
+ printf ("tld_check_4z() failed (%d): %s\n", rc, tld_strerror (rc));
return 2;
}