Bringing ChocolateCaste-0.7 into the main branch.
[AROS-Contrib.git] / rexx / lstring / neg.c
blob3d4b40e0c962d63957dfb00968a80159a08e0f09
1 /*
2 * $Header$
3 * $Log$
4 * Revision 1.1 2001/04/04 05:43:38 wang
5 * First commit: compiles on Linux, Amiga, Windows, Windows CE, generic gcc
7 * Revision 1.1 1998/07/02 17:18:00 bnv
8 * Initial Version
12 #include <lstring.h>
14 /* ------------------- Lneg ------------------ */
15 void
16 Lneg( const PLstr to, const PLstr num )
18 L2NUM(num);
20 if (LTYPE(*num)==LINTEGER_TY) {
21 LINT(*to) = -LINT(*num);
22 LTYPE(*to) = LINTEGER_TY;
23 LLEN(*to) = sizeof(long);
24 } else {
25 LREAL(*to) = -LREAL(*num);
26 LTYPE(*to) = LREAL_TY;
27 LLEN(*to) = sizeof(double);
29 } /* Lneg */