# 2.11BSD#431 - /usr/src/libexec/tcpd/percent_m.c

##### Functions

    percent_m         X

       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

percent_m defined in line 17; used 5 times

- in /usr/src/libexec/tcpd/fakelog.c line 37
- in /usr/src/libexec/tcpd/inetcf.c line 69, 82
- in /usr/src/libexec/tcpd/mystdarg.h line 19
- in /usr/src/libexec/tcpd/myvsyslog.c line 29

#### 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: 470 |