File: strpidt.c

package info (click to toggle)
maildrop 0.75-2.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,760 kB
  • ctags: 1,588
  • sloc: cpp: 9,269; ansic: 6,018; perl: 786; sh: 467; makefile: 398
file content (29 lines) | stat: -rw-r--r-- 1,048 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* DSTART                                                                    */
/*                                                                           */
/*           maildrop - mail delivery agent with filtering abilities         */
/*                                                                           */
/*  Copyright 1998-1999, Double Precision Inc.                               */
/*                                                                           */
/*  This program is distributed under the terms of the GNU General Public    */
/*  License. See COPYING for additional information.                         */
/* DEND                                                                      */
#if	HAVE_CONFIG_H
#include	"config.h"
#endif
#include	"numlib.h"

static const char rcsid[]="$Id: strpidt.c,v 1.1 1999/09/21 03:57:30 mrsam Exp $";

char *str_pid_t(pid_t t, char *arg)
{
char	buf[NUMBUFSIZE];
char	*p=buf+sizeof(buf)-1;

	*p=0;
	do
	{
		*--p= '0' + (t % 10);
		t=t / 10;
	} while(t);
	return (strcpy(arg, p));
}