Missing dependencies added.
[AROS-Contrib.git] / rexx / lstring / d2x.c
blobaeef4eb4d33fb0d530cc9ee13f54ec870d095a3d
1 /*
2 * $Header$
3 * $Log$
4 * Revision 1.1 2001/04/04 05:43:37 wang
5 * First commit: compiles on Linux, Amiga, Windows, Windows CE, generic gcc
7 * Revision 1.1 1998/07/02 17:17:00 bnv
8 * Initial revision
12 #include <lstring.h>
14 /* ------------------ Ld2x ------------------ */
15 void
16 Ld2x( const PLstr to, const PLstr from, long length)
18 Lstr tmp,tmp2;
19 long n;
21 LINITSTR(tmp);
22 LINITSTR(tmp2);
24 if (length<0) {
25 Ld2c(&tmp,from,-1);
26 Lc2x(&tmp2,&tmp);
27 length = LLEN(tmp2) - (LSTR(tmp2)[0]=='0');
28 } else {
29 n = length/2 + (length&1);
30 Ld2c(&tmp,from,n);
31 Lc2x(&tmp2,&tmp);
33 Lright(to,&tmp2,length,' ');
35 /********
36 if (length<0) length = 0;
38 n = length/2 + (length&1);
39 Ld2c(&tmp,from,n);
40 if (length) {
41 Lc2x(&tmp2,&tmp);
42 Lright(to,&tmp2,length,' ');
43 } else
44 Lc2x(to,&tmp);
45 ******/
47 LFREESTR(tmp);
48 LFREESTR(tmp2);
49 } /* Ld2x */