[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS libidn/src
From: |
libidn-commit |
Subject: |
CVS libidn/src |
Date: |
Sat, 02 Oct 2004 19:03:37 +0200 |
Update of /home/cvs/libidn/src
In directory dopio:/tmp/cvs-serv1788/src
Modified Files:
idn.c
Log Message:
Add idna_strerror, pr29_strerror, punycode_strerror, stringprep_strerror,
and tld_strerror, suggested by Daniel Stenberg <address@hidden>.
Make idn.c use them.
Rename TLD_NOTLD to TLD_NO_TLD.
--- /home/cvs/libidn/src/idn.c 2004/08/10 21:29:54 1.28
+++ /home/cvs/libidn/src/idn.c 2004/10/02 17:03:37 1.29
@@ -148,9 +148,8 @@
free (p);
if (rc != STRINGPREP_OK)
{
- fprintf (stderr,
- _("%s: stringprep_profile() failed with error %d.\n"),
- argv[0], rc);
+ fprintf (stderr, _("%s: stringprep_profile: %s\n"),
+ argv[0], stringprep_strerror (rc));
return 1;
}
@@ -220,9 +219,8 @@
free (q);
if (rc != PUNYCODE_SUCCESS)
{
- fprintf (stderr,
- _("%s: punycode_encode() failed with error %d.\n"),
- argv[0], rc);
+ fprintf (stderr, _("%s: punycode_encode: %s\n"),
+ argv[0], punycode_strerror (rc));
return 1;
}
@@ -259,9 +257,8 @@
if (rc != PUNYCODE_SUCCESS)
{
free (q);
- fprintf (stderr,
- _("%s: punycode_decode() failed with error %d.\n"),
- argv[0], rc);
+ fprintf (stderr, _("%s: punycode_decode: %s\n"),
+ argv[0], punycode_strerror (rc));
return 1;
}
@@ -331,8 +328,8 @@
free (q);
if (rc != IDNA_SUCCESS)
{
- fprintf (stderr, _("%s: idna_to_ascii_4z() failed "
- "with error %d.\n"), argv[0], rc);
+ fprintf (stderr, _("%s: idna_to_ascii_4z: %s\n"),
+ argv[0], idna_strerror (rc));
return 1;
}
@@ -348,8 +345,8 @@
IDNA_USE_STD3_ASCII_RULES : 0));
if (rc != IDNA_SUCCESS)
{
- fprintf (stderr, _("%s: TLD idna_to_unicode_8z8z() failed "
- "with error %d.\n"), argv[0], rc);
+ fprintf (stderr, _("%s: idna_to_unicode_8z4z (TLD): %s\n"),
+ argv[0], idna_strerror (rc));
return 1;
}
@@ -363,17 +360,15 @@
rc = tld_check_4z (q, &errpos, NULL);
if (rc == TLD_INVALID)
{
- fprintf (stderr, _("%s: string rejected by TLD test "
- "(Unicode position %d)\n"), argv[0],
- errpos);
+ fprintf (stderr, _("%s: tld_check_4z (position %d): %s\n"),
+ argv[0], errpos, tld_strerror (rc));
free (q);
return 1;
}
if (rc != TLD_SUCCESS)
{
- fprintf (stderr,
- _("%s: tld_check_4z failed with error %d.\n"),
- argv[0], rc);
+ fprintf (stderr, _("%s: tld_check_4z: %s\n"),
+ argv[0], tld_strerror (rc));
free (q);
return 1;
}
@@ -430,8 +425,8 @@
free (p);
if (rc != IDNA_SUCCESS)
{
- fprintf (stderr, _("%s: idna_to_unicode_8z4z() "
- "failed with error %d.\n"), argv[0], rc);
+ fprintf (stderr, _("%s: idna_to_unicode_8z4z: %s\n"),
+ argv[0], idna_strerror (rc));
return 1;
}
@@ -450,17 +445,15 @@
rc = tld_check_4z (q, &errpos, NULL);
if (rc == TLD_INVALID)
{
- fprintf (stderr, _("%s: string rejected by TLD test "
- "(Unicode position %d)\n"), argv[0],
- errpos);
+ fprintf (stderr, _("%s: tld_check_4z (position %d): %s\n"),
+ argv[0], errpos, tld_strerror (rc));
free (q);
return 1;
}
if (rc != TLD_SUCCESS)
{
- fprintf (stderr,
- _("%s: tld_check_4z failed with error %d.\n"),
- argv[0], rc);
+ fprintf (stderr, _("%s: tld_check_4z: %s\n"),
+ argv[0], tld_strerror (rc));
free (q);
return 1;
}