Fix for initialization of scalos preferences library. Library is now loaded only...
[AROS-Contrib.git] / rexx / lstring / bitor.c
blobd458a2f0ad4f444f24646c0c34827637a6acf491
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:16:35 bnv
8 * Initial revision
12 #include <lstring.h>
14 /* ---------------- Lbitor ------------------ */
15 void
16 Lbitor( const PLstr to, const PLstr s1, const PLstr s2,
17 const bool usepad, const char pad )
19 long i;
21 L2STR(s1);
22 L2STR(s2);
24 if (LLEN(*s1) < LLEN(*s2)) {
25 Lstrcpy(to,s2);
26 for (i=0; i<LLEN(*s1); i++)
27 LSTR(*to)[i] = LSTR(*s1)[i] | LSTR(*s2)[i];
29 if (usepad)
30 for (; i<LLEN(*s2); i++)
31 LSTR(*to)[i] = LSTR(*s2)[i] | pad;
32 } else {
33 Lstrcpy(to,s1);
35 for (i=0; i<LLEN(*s2); i++)
36 LSTR(*to)[i] = LSTR(*s1)[i] | LSTR(*s2)[i];
38 if (usepad)
39 for (; i<LLEN(*s1); i++)
40 LSTR(*to)[i] = LSTR(*s1)[i] | pad;
42 } /* Lbitor */