Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

replace some instances of printf with fputc/fputs

  • Loading branch information...
commit 16fb95ad6c6f59e2039f5f1bf68797f8fa6b3be3 1 parent b911dcb
Dave Reisner authored

Showing 1 changed file with 13 additions and 13 deletions. Show diff stats Hide diff stats

  1. +13 13 cower.c
26 cower.c
@@ -948,7 +948,7 @@ void indentprint(const char *str, int indent) /* {{{ */
948 948
949 949 /* if we're not a tty, print without indenting */
950 950 if(cols == 0) {
951   - printf("%s", str);
  951 + fputs(str, stdout);
952 952 return;
953 953 }
954 954
@@ -987,7 +987,7 @@ void indentprint(const char *str, int indent) /* {{{ */
987 987 printf("\n%-*s", indent, "");
988 988 cidx = indent;
989 989 } else {
990   - printf(" ");
  990 + fputc(' ', stdout);
991 991 cidx++;
992 992 }
993 993 continue;
@@ -1664,7 +1664,7 @@ void print_extinfo_list(alpm_list_t *list, const char *fieldname, const char *de
1664 1664 printf("%-*c", INFO_INDENT + 1, '\n');
1665 1665 count = INFO_INDENT;
1666 1666 }
1667   - count += printf("%s", (const char*)i->data);
  1667 + count += fputs(i->data, stdout);
1668 1668 if(next) {
1669 1669 count += print_escaped(delim);
1670 1670 }
@@ -2324,16 +2324,16 @@ void usage(void) /* {{{ */
2324 2324
2325 2325 void version(void) /* {{{ */
2326 2326 {
2327   - printf("\n " COWER_VERSION "\n");
2328   - printf(" \\\n"
2329   - " \\\n"
2330   - " ,__, | |\n"
2331   - " (oo)\\| |___\n"
2332   - " (__)\\| | )\\_\n"
2333   - " U | |_w | \\\n"
2334   - " | | || *\n"
2335   - "\n"
2336   - " Cower....\n\n");
  2327 + fputs("\n " COWER_VERSION "\n", stdout);
  2328 + fputs(" \\\n"
  2329 + " \\\n"
  2330 + " ,__, | |\n"
  2331 + " (oo)\\| |___\n"
  2332 + " (__)\\| | )\\_\n"
  2333 + " U | |_w | \\\n"
  2334 + " | | || *\n"
  2335 + "\n"
  2336 + " Cower....\n\n", stdout);
2337 2337 } /* }}} */
2338 2338
2339 2339 size_t yajl_parse_stream(void *ptr, size_t size, size_t nmemb, void *stream) /* {{{ */

0 comments on commit 16fb95a

Please sign in to comment.
Something went wrong with that request. Please try again.