From 871a8223794ebbf975944923dc47a75fabd147d3 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Tue, 11 Aug 2015 01:00:05 -0700 Subject: [PATCH] Remove some dead #defines --- src/builtin.h | 26 -------------------------- src/complete.h | 5 ----- src/env_universal_common.h | 5 ----- src/fish_tests.cpp | 5 ----- src/output.h | 12 +----------- src/util.cpp | 18 ------------------ 6 files changed, 1 insertion(+), 70 deletions(-) diff --git a/src/builtin.h b/src/builtin.h index 4d63fcb28..e2a9478eb 100644 --- a/src/builtin.h +++ b/src/builtin.h @@ -62,37 +62,11 @@ enum */ #define BUILTIN_ERR_VARNAME_ZERO _( L"%ls: Variable name can not be the empty string\n" ) -/** - Error message when second argument to for isn't 'in' -*/ -#define BUILTIN_FOR_ERR_IN _( L"%ls: Second argument must be 'in'\n" ) - -/** - Error message for insufficient number of arguments -*/ -#define BUILTIN_FOR_ERR_COUNT _( L"%ls: Expected at least two arguments, got %d\n") - -#define BUILTIN_FOR_ERR_NAME _( L"%ls: '%ls' is not a valid variable name\n" ) - -/** Error messages for 'else if' */ -#define BUILTIN_ELSEIF_ERR_COUNT _( L"%ls: can only take 'if' and then another command as an argument\n") -#define BUILTIN_ELSEIF_ERR_ARGUMENT _( L"%ls: any second argument must be 'if'\n") - /** Error message when too many arguments are supplied to a builtin */ #define BUILTIN_ERR_TOO_MANY_ARGUMENTS _( L"%ls: Too many arguments\n" ) -/** - Error message when block types mismatch in the end builtin, e.g. 'begin; end for' -*/ -#define BUILTIN_END_BLOCK_MISMATCH _( L"%ls: Block mismatch: '%ls' vs. '%ls'\n" ) - -/** - Error message for unknown block type in the end builtin, e.g. 'begin; end beggin' -*/ -#define BUILTIN_END_BLOCK_UNKNOWN _( L"%ls: Unknown block type '%ls'\n" ) - #define BUILTIN_ERR_NOT_NUMBER _( L"%ls: Argument '%ls' is not a number\n" ) /** Get the string used to represent stdout and stderr */ diff --git a/src/complete.h b/src/complete.h index deb0c42a5..41c9c3e0b 100644 --- a/src/complete.h +++ b/src/complete.h @@ -48,11 +48,6 @@ */ #define COMPLETE_SEP L'\004' -/** - * Separator between completion and description - */ -#define COMPLETE_SEP_STR L"\004" - /** * Character that separates the completion and description on * programmable completions diff --git a/src/env_universal_common.h b/src/env_universal_common.h index 7aca60df1..203f952b6 100644 --- a/src/env_universal_common.h +++ b/src/env_universal_common.h @@ -20,11 +20,6 @@ typedef enum ERASE } fish_message_type_t; -/** - The size of the buffer used for reading from the file -*/ -#define ENV_UNIVERSAL_BUFFER_SIZE 1024 - /** Callback data, reflecting a change in universal variables */ diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp index c507aca3f..eb26460be 100644 --- a/src/fish_tests.cpp +++ b/src/fish_tests.cpp @@ -115,11 +115,6 @@ static bool should_test_function(const char *func_name) */ #define LAPS 50 -/** - The result of one of the test passes -*/ -#define NUM_ANS L"-7 99999999 1234567 deadbeef DEADBEEFDEADBEEF" - /** Number of encountered errors */ diff --git a/src/output.h b/src/output.h index a952d8a44..68ad2a2e5 100644 --- a/src/output.h +++ b/src/output.h @@ -31,17 +31,7 @@ enum FISH_COLOR_NORMAL, FISH_COLOR_IGNORE, FISH_COLOR_RESET -} -; - -/** - The value to send to set_color to tell it to use a bold font -*/ -#define FISH_COLOR_BOLD 0x80 -/** - The value to send to set_color to tell it to underline the text -*/ -#define FISH_COLOR_UNDERLINE 0x100 +}; /** Sets the fg and bg color. May be called as often as you like, since diff --git a/src/util.cpp b/src/util.cpp index 85b9d8d7d..14cce1c73 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -29,24 +29,6 @@ #include "common.h" #include "wutil.h" -/** - Minimum allocated size for data structures. Used to avoid excessive - memory allocations for lists, hash tables, etc, which are nearly - empty. -*/ -#define MIN_SIZE 32 - -/** - Maximum number of characters that can be inserted using a single - call to sb_printf. This is needed since vswprintf doesn't tell us - what went wrong. We don't know if we ran out of space or something - else went wrong. We assume that any error is an out of memory-error - and try again until we reach this size. After this size has been - reached, it is instead assumed that something was wrong with the - format string. -*/ -#define SB_MAX_SIZE (128*1024*1024) - int wcsfilecmp(const wchar_t *a, const wchar_t *b) { CHECK(a, 0);