]> rtime.felk.cvut.cz Git - notmuch.git/blob - contrib/notmuch-deliver/maildrop/numlib/strpidt.c
0c29b07e4f047f0ee65485f590357e9f73c98714
[notmuch.git] / contrib / notmuch-deliver / maildrop / numlib / strpidt.c
1 /*
2 ** Copyright 1998 - 2000 Double Precision, Inc.
3 ** See COPYING for distribution information.
4 */
5
6 #if     HAVE_CONFIG_H
7 #include        "config.h"
8 #endif
9 #include        "numlib.h"
10 #include        <string.h>
11
12
13 char *libmail_str_pid_t(pid_t t, char *arg)
14 {
15 char    buf[NUMBUFSIZE];
16 char    *p=buf+sizeof(buf)-1;
17
18         *p=0;
19         do
20         {
21                 *--p= '0' + (t % 10);
22                 t=t / 10;
23         } while(t);
24         return (strcpy(arg, p));
25 }