Commit 57aaac8d authored by Manish Singh's avatar Manish Singh Committed by Manish Singh
Browse files

merges from gimp-1-2 branch

2002-04-10  Manish Singh  <yosh@gimp.org>

        * plug-ins/common/url.c: merges from gimp-1-2 branch
parent f7f7d97e
2002-04-10 Manish Singh <yosh@gimp.org>
* plug-ins/common/url.c: merges from gimp-1-2 branch
2002-04-06 Sven Neumann <sven@gimp.org>
 
* app/core/gimpscanconvert.c: include libart.h instead of a selection
......
......@@ -212,6 +212,7 @@ load_image (gchar *filename,
{
FILE *input;
gchar buf[BUFSIZE];
gboolean seen_resolve = FALSE;
gboolean connected = FALSE;
gboolean file_found = FALSE;
gchar sizestr[32];
......@@ -259,6 +260,7 @@ load_image (gchar *filename,
gimp_progress_init ("Connecting to server... "
"(timeout is "TIMEOUT" seconds)");
read_connect:
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("url: wget exited abnormally on URL\n%s", filename);
......@@ -270,6 +272,12 @@ load_image (gchar *filename,
{
connected = TRUE;
}
/* newer wgets have a "Resolving foo" line, so eat it */
else if (!seen_resolve && strstr (buf, "Resolving"))
{
seen_resolve = TRUE;
goto read_connect;
}
DEBUG (buf);
......@@ -356,7 +364,7 @@ load_image (gchar *filename,
{
dot = fgetc (input);
if (dot == EOF)
if (feof (input))
break;
if (debug)
......
......@@ -212,6 +212,7 @@ load_image (gchar *filename,
{
FILE *input;
gchar buf[BUFSIZE];
gboolean seen_resolve = FALSE;
gboolean connected = FALSE;
gboolean file_found = FALSE;
gchar sizestr[32];
......@@ -259,6 +260,7 @@ load_image (gchar *filename,
gimp_progress_init ("Connecting to server... "
"(timeout is "TIMEOUT" seconds)");
read_connect:
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("url: wget exited abnormally on URL\n%s", filename);
......@@ -270,6 +272,12 @@ load_image (gchar *filename,
{
connected = TRUE;
}
/* newer wgets have a "Resolving foo" line, so eat it */
else if (!seen_resolve && strstr (buf, "Resolving"))
{
seen_resolve = TRUE;
goto read_connect;
}
DEBUG (buf);
......@@ -356,7 +364,7 @@ load_image (gchar *filename,
{
dot = fgetc (input);
if (dot == EOF)
if (feof (input))
break;
if (debug)
......
......@@ -212,6 +212,7 @@ load_image (gchar *filename,
{
FILE *input;
gchar buf[BUFSIZE];
gboolean seen_resolve = FALSE;
gboolean connected = FALSE;
gboolean file_found = FALSE;
gchar sizestr[32];
......@@ -259,6 +260,7 @@ load_image (gchar *filename,
gimp_progress_init ("Connecting to server... "
"(timeout is "TIMEOUT" seconds)");
read_connect:
if (fgets (buf, BUFSIZE, input) == NULL)
{
g_message ("url: wget exited abnormally on URL\n%s", filename);
......@@ -270,6 +272,12 @@ load_image (gchar *filename,
{
connected = TRUE;
}
/* newer wgets have a "Resolving foo" line, so eat it */
else if (!seen_resolve && strstr (buf, "Resolving"))
{
seen_resolve = TRUE;
goto read_connect;
}
DEBUG (buf);
......@@ -356,7 +364,7 @@ load_image (gchar *filename,
{
dot = fgetc (input);
if (dot == EOF)
if (feof (input))
break;
if (debug)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment