1:  /*
   2:   * Replace %m by system error message.
   3:   *
   4:   * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
   5:   */
   6: 
   7: #if !defined(lint) && defined(DOSCCS)
   8: static char sccsid[] = "@(#) percent_m.c 1.1.1 96/3/23 17:42:37";
   9: #endif
  10: 
  11: #include <stdio.h>
  12: #include <errno.h>
  13: #include <string.h>
  14: 
  15: #include "mystdarg.h"
  16: 
  17: char   *percent_m(obuf, ibuf)
  18: char   *obuf;
  19: char   *ibuf;
  20: {
  21:     char   *bp = obuf;
  22:     char   *cp = ibuf;
  23: 
  24:     while (*bp = *cp)
  25:     if (*cp == '%' && cp[1] == 'm') {
  26:         strcpy(bp, strerror(errno));
  27:         bp += strlen(bp);
  28:         cp += 2;
  29:     } else {
  30:         bp++, cp++;
  31:     }
  32:     return (obuf);
  33: }

Defined functions

Defined variables

sccsid defined in line 8; never used
Last modified: 1996-03-24
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2168
Valid CSS Valid XHTML 1.0 Strict