prism2.device: Compiler delint
[AROS.git] / workbench / c / SetLocale.c
bloba7eb48fe5e1aa1be7d7f287579fc3f97d0b9111a
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: SetLocale CLI command
6 Lang: English
7 */
9 #include <exec/types.h>
10 #include <dos/dos.h>
11 #include <libraries/locale.h>
12 #include <proto/exec.h>
13 #include <proto/dos.h>
14 #include <proto/locale.h>
16 int main(int argc, char **av)
18 struct Locale *new;
20 if(argc != 2)
22 PrintFault(ERROR_REQUIRED_ARG_MISSING, "SetLocale");
23 return 20;
26 new = OpenLocale(av[1]);
27 FPuts(Output(), "Locale opened\n");
28 if(new)
30 struct Locale *old = NULL;
31 old = LocalePrefsUpdate(new);
32 FPuts(Output(), "Locale set\n");
33 CloseLocale(old);
34 CloseLocale(new);
36 else
38 PrintFault(IoErr(), "SetLocale");
39 return 20;
42 return 0;