summaryrefslogtreecommitdiff
path: root/examples/url-parse.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-09-02 14:33:29 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-09-02 14:33:29 +0000
commit963dbebcfeba4731d5479c6e18e8fd0b4f4ac0eb (patch)
tree5a0fc17e3c42a704c464acbd1f29d3d8381fc131 /examples/url-parse.c
parent3a3490eecf751bfc54c90692eab20d8408061bea (diff)
downloadmailutils-963dbebcfeba4731d5479c6e18e8fd0b4f4ac0eb.tar.gz
mailutils-963dbebcfeba4731d5479c6e18e8fd0b4f4ac0eb.tar.bz2
Untabified. Needed for proper conversion to *.texi
Diffstat (limited to 'examples/url-parse.c')
-rw-r--r--examples/url-parse.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/examples/url-parse.c b/examples/url-parse.c
index 7c6b1c856..528df09ad 100644
--- a/examples/url-parse.c
+++ b/examples/url-parse.c
@@ -33,46 +33,46 @@ main ()
{
int rc;
- str[strlen (str) - 1] = '\0'; /* chop newline */
+ str[strlen (str) - 1] = '\0'; /* chop newline */
if (strspn (str, " \t") == strlen (str))
- continue; /* skip empty lines */
+ continue; /* skip empty lines */
if ((rc = url_create (&u, str)) != 0)
- {
- fprintf (stderr, "url_create %s ERROR: [%d] %s",
- str, rc, mu_errstring (rc));
- exit (1);
- }
+ {
+ fprintf (stderr, "url_create %s ERROR: [%d] %s",
+ str, rc, mu_errstring (rc));
+ exit (1);
+ }
if ((rc = url_parse (u)) != 0)
- {
- printf ("%s => FAILED: [%d] %s\n",
- str, rc, mu_errstring (rc));
- continue;
- }
+ {
+ printf ("%s => FAILED: [%d] %s\n",
+ str, rc, mu_errstring (rc));
+ continue;
+ }
printf ("%s => SUCCESS\n", str);
url_get_scheme (u, buffer, len, NULL);
- printf (" scheme <%s>\n", buffer);
+ printf (" scheme <%s>\n", buffer);
url_get_user (u, buffer, len, NULL);
- printf (" user <%s>\n", buffer);
+ printf (" user <%s>\n", buffer);
url_get_passwd (u, buffer, len, NULL);
- printf (" passwd <%s>\n", buffer);
+ printf (" passwd <%s>\n", buffer);
url_get_auth (u, buffer, len, NULL);
- printf (" auth <%s>\n", buffer);
+ printf (" auth <%s>\n", buffer);
url_get_host (u, buffer, len, NULL);
- printf (" host <%s>\n", buffer);
+ printf (" host <%s>\n", buffer);
url_get_port (u, &port);
- printf (" port %ld\n", port);
+ printf (" port %ld\n", port);
url_get_path (u, buffer, len, NULL);
- printf (" path <%s>\n", buffer);
+ printf (" path <%s>\n", buffer);
url_get_query (u, buffer, len, NULL);
- printf (" query <%s>\n", buffer);
+ printf (" query <%s>\n", buffer);
url_destroy (&u);

Return to:

Send suggestions and report system problems to the System administrator.