Imported Upstream version 0.66.1
[hcoop/debian/courier-authlib.git] / libs / numlib / strdevt.c
1 /*
2 ** Copyright 2003 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_dev_t(dev_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 }