From 6e467dbf3fcdf1a7331d8ac662b444d4b9d42d07 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 17 Nov 2015 02:49:02 +0100 Subject: errno.c => errno/variables.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/errno.c | 52 --------------------------------------------------- src/errno/variables.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 52 deletions(-) delete mode 100644 src/errno.c create mode 100644 src/errno/variables.c diff --git a/src/errno.c b/src/errno.c deleted file mode 100644 index aae7513..0000000 --- a/src/errno.c +++ /dev/null @@ -1,52 +0,0 @@ -/** - * slibc — Yet another C library - * Copyright © 2015 Mattias Andrée (maandree@member.fsf.org) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include -#include - - - -/** - * This is the name that was used to invoke the program - * running in the current process. This is the value - * of `argv[0]` from the `main` function (where `argv` - * is the second parameter). If `argc` is zero, this - * variable will have the value `NULL`. This is not - * necessarily a proper comman name. For example, - * login shells are usually prefixes with a dash, - * for example "-bash", despite that there is no such - * command. Often, but not always, this will not contain - * directory. - * - * This string may be edited if `program_invocation_short_name` - * or `argv[0]` is edited. - * - * This is a GNU and slibc extension. - */ -char* program_invocation_name = NULL; - -/** - * Variant of `program_invocation_name` that is - * guaranteed to not include the directory. - * - * This string may be edited if `program_invocation_name` - * or `argv[0]` is edited. - * - * This is a GNU extension. - */ -char* program_invocation_short_name = NULL; - diff --git a/src/errno/variables.c b/src/errno/variables.c new file mode 100644 index 0000000..e204a2c --- /dev/null +++ b/src/errno/variables.c @@ -0,0 +1,51 @@ +/** + * slibc — Yet another C library + * Copyright © 2015 Mattias Andrée (maandree@member.fsf.org) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include + + + +/** + * This is the name that was used to invoke the program + * running in the current process. This is the value + * of `argv[0]` from the `main` function (where `argv` + * is the second parameter). If `argc` is zero, this + * variable will have the value `NULL`. This is not + * necessarily a proper comman name. For example, + * login shells are usually prefixes with a dash, + * for example "-bash", despite that there is no such + * command. Often, but not always, this will not contain + * directory. + * + * This string may be edited if `program_invocation_short_name` + * or `argv[0]` is edited. + * + * This is a GNU and slibc extension. + */ +char* program_invocation_name = NULL; + +/** + * Variant of `program_invocation_name` that is + * guaranteed to not include the directory. + * + * This string may be edited if `program_invocation_name` + * or `argv[0]` is edited. + * + * This is a GNU extension. + */ +char* program_invocation_short_name = NULL; + -- cgit v1.2.3-70-g09d2