[cs631apue] starting functions in GNU Linux mian()
cpunjabi
cpunjabi at stevens.edu
Tue Sep 16 22:30:26 EDT 2014
argv[0] always contains the name of the program. i.e if you run
welcome.c program, argv[0] contains "welcome". I think setlocale is used
for internationalization, LC_ALL specifies the locale for all purposes
and By setting the locale to "", we are implicitly assigning the locale
to the user's defined locale.
On 2014-09-16 22:15, xxu15 at stevens.edu wrote:
>
> Hi,
> I found that in many GNU Linux c files, at the begining of the main()
> function, there are such functions being invoked as below:
>
> initialize_main (&argc, &argv);
> set_program_name (argv[0]);
> setlocale (LC_ALL, "");
>
> bindtextdomain (PACKAGE, LOCALEDIR);
> textdomain (PACKAGE);
>
> Has any body figured out what they are used for ?
>
> -------------------------
>
> Sincerely,
> Xiang Xu (徐祥)
> Student ID: 10388813
> tel: +1 (201) 918-0570
> +86 13851478402
> qq: 185904095
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs631apue
More information about the cs631apue
mailing list