--- /usr/ports/devel/cocktail/work/cocktail-9309//./reuse/m2c/SetsDrv2.c Sat Sep 11 00:58:46 2004 +++ ./reuse/m2c/SetsDrv2.c Thu Aug 5 18:49:36 2004 @@ -0,0 +1,160 @@ +#include "SYSTEM_.h" + +#ifndef DEFINITION_Sets +#include "Sets.h" +#endif + +#ifndef DEFINITION_IO +#include "IO.h" +#endif + +#include +#include + +int sizes[] = { 1, 2, 3, 4, 5, + 7, 8, 9, + 15, 16, 17, + 31, 32, 33, + 63, 64, 65, + 127, 128, 129, + 254, 255, 256, + 511, 512, 513, + 1023, 1024, 1025, + 0 }; + +#define MAXSET 1026 +int myset[MAXSET]; + +static Sets_tSet s, t, u, v; +static IO_tFile f; + +static void SetInfo( Sets_tSet s ) +{ + Sets_WriteSet((rSystem_tFile)IO_StdOutput, s); + IO_WriteS((rSystem_tFile)IO_StdOutput, (STRING)" Card = ", 8L); + IO_WriteI((rSystem_tFile)IO_StdOutput, (LONGINT)Sets_Card(&s), 0L); + IO_WriteNl((rSystem_tFile)IO_StdOutput); +} + +static BOOLEAN TestOdd(int i) +{ + return (i%2) == 1; +} + +static BOOLEAN TestEven(int i) +{ + return (i%2) == 0; +} + +static void CleanMyset(void) +{ + int i; + for (i=0; i++; i