00001 #include <lib.h> 00002 #include <string.h> 00003 00004 PUBLIC void _loadname(name, msgptr) 00005 _CONST char *name; 00006 message *msgptr; 00007 { 00008 /* This function is used to load a string into a type m3 message. If the 00009 * string fits in the message, it is copied there. If not, a pointer to 00010 * it is passed. 00011 */ 00012 00013 register size_t k; 00014 00015 k = strlen(name) + 1; 00016 msgptr->m3_i1 = k; 00017 msgptr->m3_p1 = (char *) name; 00018 if (k <= sizeof msgptr->m3_ca1) strcpy(msgptr->m3_ca1, name); 00019 }
1.4.6