Rev | Line | |
---|
[9] | 1 | #include <lib.h>
|
---|
| 2 | #include <string.h>
|
---|
| 3 |
|
---|
| 4 | PUBLIC void _loadname(name, msgptr)
|
---|
| 5 | _CONST char *name;
|
---|
| 6 | message *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.