Commit 4d288c29 4d288c2946b56e4c3a9707ed11a70e16d4a4d968 by Sergey Poznyakoff

Use strerror uniformly

1 parent 43a07d65
...@@ -111,7 +111,7 @@ parse_headers (FILE *fp, compose_env_t *env) ...@@ -111,7 +111,7 @@ parse_headers (FILE *fp, compose_env_t *env)
111 if (p) 111 if (p)
112 { 112 {
113 *p++ = 0; 113 *p++ = 0;
114 while (*p && isspace(*p)) 114 while (*p && isspace (*p))
115 p++; 115 p++;
116 value = strdup (p); 116 value = strdup (p);
117 name = strdup (buf); 117 name = strdup (buf);
...@@ -245,7 +245,7 @@ escape_sign (int argc ARG_UNUSED, char **argv, compose_env_t *env ARG_UNUSED) ...@@ -245,7 +245,7 @@ escape_sign (int argc ARG_UNUSED, char **argv, compose_env_t *env ARG_UNUSED)
245 245
246 if (!fp) 246 if (!fp)
247 { 247 {
248 util_error (_("Cannot open %s: %s"), name, strerror (errno)); 248 util_error (_("Cannot open %s: %s"), name, mu_strerror (errno));
249 free (name); 249 free (name);
250 } 250 }
251 251
...@@ -544,7 +544,7 @@ escape_read (int argc, char **argv, compose_env_t *env ARG_UNUSED) ...@@ -544,7 +544,7 @@ escape_read (int argc, char **argv, compose_env_t *env ARG_UNUSED)
544 inf = fopen (filename, "r"); 544 inf = fopen (filename, "r");
545 if (!inf) 545 if (!inf)
546 { 546 {
547 util_error (_("Cannot open %s: %s"), filename, strerror (errno)); 547 util_error (_("Cannot open %s: %s"), filename, mu_strerror (errno));
548 free (filename); 548 free (filename);
549 return 1; 549 return 1;
550 } 550 }
...@@ -599,7 +599,7 @@ escape_write (int argc, char **argv, compose_env_t *env) ...@@ -599,7 +599,7 @@ escape_write (int argc, char **argv, compose_env_t *env)
599 599
600 if (!fp) 600 if (!fp)
601 { 601 {
602 util_error (_("Cannot open %s: %s"), filename, strerror (errno)); 602 util_error (_("Cannot open %s: %s"), filename, mu_strerror (errno));
603 free (filename); 603 free (filename);
604 return 1; 604 return 1;
605 } 605 }
...@@ -636,7 +636,7 @@ escape_pipe (int argc, char **argv, compose_env_t *env) ...@@ -636,7 +636,7 @@ escape_pipe (int argc, char **argv, compose_env_t *env)
636 636
637 if (pipe (p)) 637 if (pipe (p))
638 { 638 {
639 util_error ("pipe: %s", strerror (errno)); 639 util_error ("pipe: %s", mu_strerror (errno));
640 return 1; 640 return 1;
641 } 641 }
642 642
...@@ -649,7 +649,7 @@ escape_pipe (int argc, char **argv, compose_env_t *env) ...@@ -649,7 +649,7 @@ escape_pipe (int argc, char **argv, compose_env_t *env)
649 close (p[0]); 649 close (p[0]);
650 close (p[1]); 650 close (p[1]);
651 close (fd); 651 close (fd);
652 util_error ("fork: %s", strerror (errno)); 652 util_error ("fork: %s", mu_strerror (errno));
653 return 1; 653 return 1;
654 } 654 }
655 else if (pid == 0) 655 else if (pid == 0)
...@@ -674,7 +674,7 @@ escape_pipe (int argc, char **argv, compose_env_t *env) ...@@ -674,7 +674,7 @@ escape_pipe (int argc, char **argv, compose_env_t *env)
674 xargv[i] = argv[i + 1]; 674 xargv[i] = argv[i + 1];
675 xargv[i] = NULL; 675 xargv[i] = NULL;
676 execvp (xargv[0], xargv); 676 execvp (xargv[0], xargv);
677 util_error (_("Cannot exec process `%s': %s"), xargv[0], strerror (errno)); 677 util_error (_("Cannot exec process `%s': %s"), xargv[0], mu_strerror (errno));
678 exit (1); 678 exit (1);
679 } 679 }
680 else 680 else
...@@ -714,7 +714,7 @@ escape_pipe (int argc, char **argv, compose_env_t *env) ...@@ -714,7 +714,7 @@ escape_pipe (int argc, char **argv, compose_env_t *env)
714 struct stat st; 714 struct stat st;
715 if (fstat (fd, &st)) 715 if (fstat (fd, &st))
716 { 716 {
717 util_error (_("Cannot stat output file: %s"), strerror (errno)); 717 util_error (_("Cannot stat output file: %s"), mu_strerror (errno));
718 } 718 }
719 else if (st.st_size > 0) 719 else if (st.st_size > 0)
720 rc = 0; 720 rc = 0;
......