~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/strxmov.c

  • Committer: Monty Taylor
  • Date: 2008-07-31 19:56:51 UTC
  • mto: (202.3.5 gettextize)
  • mto: This revision was merged to the branch mainline in revision 243.
  • Revision ID: monty@inaugust.com-20080731195651-8rolsypajn99uc2p
Some cleanups/decoupling in mystring.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    Updated: 25 may 1984
21
21
    Defines: strxmov()
22
22
 
23
 
    strxmov(dst, src1, ..., srcn, NullS)
 
23
    strxmov(dst, src1, ..., srcn, (char *))
24
24
    moves the concatenation of src1,...,srcn to dst, terminates it
25
25
    with a NUL character, and returns a pointer to the terminating NUL.
26
26
    It is just like strmov except that it concatenates multiple sources.
27
27
    Beware: the last argument should be the null character pointer.
28
 
    Take VERY great care not to omit it!  Also be careful to use NullS
29
 
    and NOT to use 0, as on some machines 0 is not the same size as a
30
 
    character pointer, or not the same bit pattern as NullS.
 
28
    Take VERY great care not to omit it! 
31
29
*/
32
30
 
33
31
#include "m_string.h"
38
36
  va_list pvar;
39
37
 
40
38
  va_start(pvar,src);
41
 
  while (src != NullS) {
 
39
  while (src != (char *)0) {
42
40
    while ((*dst++ = *src++)) ;
43
41
    dst--;
44
42
    src = va_arg(pvar, char *);