Sys.Signals module for a Variant type of signals (and a set_signal function that...
[ocaml.git] / config / auto-aux / bytecopy.c
blob923b444e5bcfe4df04b1054c75149ab74f14111b
1 /***********************************************************************/
2 /* */
3 /* Objective Caml */
4 /* */
5 /* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
6 /* */
7 /* Copyright 1996 Institut National de Recherche en Informatique et */
8 /* en Automatique. All rights reserved. This file is distributed */
9 /* under the terms of the GNU Library General Public License, with */
10 /* the special exception on linking described in file ../../LICENSE. */
11 /* */
12 /***********************************************************************/
14 /* $Id$ */
16 char buffer[27];
18 #ifdef reverse
19 #define cpy(s1,s2,n) copy(s2,s1,n)
20 #else
21 #define cpy copy
22 #endif
24 int main(int argc, char ** argv)
26 cpy("abcdefghijklmnopqrstuvwxyz", buffer, 27);
27 if (strcmp(buffer, "abcdefghijklmnopqrstuvwxyz") != 0) exit(1);
28 cpy(buffer, buffer+3, 26-3);
29 if (strcmp(buffer, "abcabcdefghijklmnopqrstuvw") != 0) exit(1);
30 cpy("abcdefghijklmnopqrstuvwxyz", buffer, 27);
31 cpy(buffer+3, buffer, 26-3);
32 if (strcmp(buffer, "defghijklmnopqrstuvwxyzxyz") != 0) exit(1);
33 exit(0);