source: trunk/minix/lib/other/loadname.c@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 446 bytes
Line 
1#include <lib.h>
2#include <string.h>
3
4PUBLIC void _loadname(name, msgptr)
5_CONST char *name;
6message *msgptr;
7{
8/* This function is used to load a string into a type m3 message. If the
9 * string fits in the message, it is copied there. If not, a pointer to
10 * it is passed.
11 */
12
13 register size_t k;
14
15 k = strlen(name) + 1;
16 msgptr->m3_i1 = k;
17 msgptr->m3_p1 = (char *) name;
18 if (k <= sizeof msgptr->m3_ca1) strcpy(msgptr->m3_ca1, name);
19}
Note: See TracBrowser for help on using the repository browser.