]> diplodocus.org Git - nmh/blob - sbr/copyip.c
96a42fba27d28eb9227798e20b2f66c0300b761e
[nmh] / sbr / copyip.c
1 /*
2 * copyip.c -- copy a string array and return pointer to end
3 *
4 * This code is Copyright (c) 2002, by the authors of nmh. See the
5 * COPYRIGHT file in the root directory of the nmh distribution for
6 * complete copyright information.
7 */
8
9 #include <h/mh.h>
10
11
12 char **
13 copyip (char **p, char **q, int len_q)
14 {
15 while (*p && --len_q > 0)
16 *q++ = *p++;
17
18 *q = NULL;
19
20 return q;
21 }