| Rev | Line | |
|---|
| [9] | 1 | /*
|
|---|
| 2 | (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|---|
| 3 | See the copyright notice in the ACK home directory, in the file "Copyright".
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | /*
|
|---|
| 7 | Module: assign string to character array, with possible 0-byte
|
|---|
| 8 | extension
|
|---|
| 9 | Author: Ceriel J.H. Jacobs
|
|---|
| 10 | Version: $Header: /cvsup/minix/src/lib/ack/libm2/StrAss.c,v 1.1 2005/10/10 15:27:46 beng Exp $
|
|---|
| 11 | */
|
|---|
| 12 | StringAssign(dstsiz, srcsiz, dstaddr, srcaddr)
|
|---|
| 13 | register char *dstaddr, *srcaddr;
|
|---|
| 14 | {
|
|---|
| 15 | while (srcsiz > 0) {
|
|---|
| 16 | *dstaddr++ = *srcaddr++;
|
|---|
| 17 | srcsiz--;
|
|---|
| 18 | dstsiz--;
|
|---|
| 19 | }
|
|---|
| 20 | if (dstsiz > 0) {
|
|---|
| 21 | *dstaddr = 0;
|
|---|
| 22 | }
|
|---|
| 23 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.