summaryrefslogtreecommitdiff
path: root/uirc.c
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2022-03-25 14:04:36 -0600
committerBryson Steck <steck.bryson@gmail.com>2022-03-25 14:04:36 -0600
commitd46ba9883117e023f79cdcfda04e028b9270db8a (patch)
tree8155fa8440f003be44ffc7ce8224b91c66ead7c5 /uirc.c
parent8efb9bbce7627fc3639e56d0b8b18540d0bbefca (diff)
downloaduirc-d46ba9883117e023f79cdcfda04e028b9270db8a.tar
uirc-d46ba9883117e023f79cdcfda04e028b9270db8a.tar.gz
uirc-d46ba9883117e023f79cdcfda04e028b9270db8a.tar.bz2
add FAIL message for requests
Diffstat (limited to 'uirc.c')
-rw-r--r--uirc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/uirc.c b/uirc.c
index 15f5da2..e59d948 100644
--- a/uirc.c
+++ b/uirc.c
@@ -70,7 +70,7 @@ int readFile(char *file, int rFlag, int req, char* url) {
unsigned char *img = stbi_load(file, &width, &height, &channels, 0);
if (img == NULL) {
if (req == 0) {
- printf("uirc: request failed (%s), trying local fs instead\n", url);
+ printf("FAIL\nuirc: request failed (%s), trying local fs instead\n", url);
return 4;
} else if (access(file, F_OK) != 0) {
printf("uirc: %s: No such file or directory\n", file);
@@ -81,6 +81,9 @@ int readFile(char *file, int rFlag, int req, char* url) {
}
}
+ if (req == 0)
+ printf("ok\n");
+
factor = getBcf(width, height);
stbi_image_free(img);
double wuneven = ((float) height) / ((float) width);
@@ -139,7 +142,7 @@ int download(char *url) {
curl_easy_cleanup(curl);
fclose(fp);
}
- printf("ok\n");
+
return 0;
}
// end of stack overflow snippet