Commit | Line | Data |
---|---|---|
d9898ee8 | 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 | static const char rcsid[]="$Id: strdevt.c,v 1.1 2003/01/26 03:22:40 mrsam Exp $"; | |
13 | ||
14 | char *libmail_str_dev_t(dev_t t, char *arg) | |
15 | { | |
16 | char buf[NUMBUFSIZE]; | |
17 | char *p=buf+sizeof(buf)-1; | |
18 | ||
19 | *p=0; | |
20 | do | |
21 | { | |
22 | *--p= '0' + (t % 10); | |
23 | t=t / 10; | |
24 | } while(t); | |
25 | return (strcpy(arg, p)); | |
26 | } |