Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / libs / rexxsupport / delay.c
blob6f3f171f0225ae4767a30afef79dddd7138c721c
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Rexx stub for Delay system function
6 Lang: English
7 */
9 #include <proto/alib.h>
10 #include <proto/exec.h>
11 #include <proto/dos.h>
12 #include <proto/rexxsyslib.h>
13 #include <exec/types.h>
14 #include <rexx/storage.h>
15 #include <rexx/errors.h>
17 #include <ctype.h>
18 #include <string.h>
19 #include <stdlib.h>
21 #include "rexxsupport_intern.h"
22 #include "rxfunctions.h"
24 LONG rxsupp_delay(struct Library *RexxSupportBase, struct RexxMsg *msg, UBYTE **argstring)
26 int pos, len;
27 char *arg = ARG1(msg);
29 len = strlen(arg);
30 if (len == 0)
32 *argstring = NULL;
33 return ERR10_018;
36 for (pos = 0; pos < len; pos++)
38 if (!isdigit(arg[pos]))
40 *argstring = NULL;
41 return ERR10_018;
45 Delay(atoi(arg));
47 *argstring = CreateArgstring("0", 1);
48 return RC_OK;