mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Remove some dead #defines
This commit is contained in:
parent
b9b6b6108e
commit
871a822379
@ -62,37 +62,11 @@ enum
|
|||||||
*/
|
*/
|
||||||
#define BUILTIN_ERR_VARNAME_ZERO _( L"%ls: Variable name can not be the empty string\n" )
|
#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
|
Error message when too many arguments are supplied to a builtin
|
||||||
*/
|
*/
|
||||||
#define BUILTIN_ERR_TOO_MANY_ARGUMENTS _( L"%ls: Too many arguments\n" )
|
#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" )
|
#define BUILTIN_ERR_NOT_NUMBER _( L"%ls: Argument '%ls' is not a number\n" )
|
||||||
|
|
||||||
/** Get the string used to represent stdout and stderr */
|
/** Get the string used to represent stdout and stderr */
|
||||||
|
@ -48,11 +48,6 @@
|
|||||||
*/
|
*/
|
||||||
#define COMPLETE_SEP L'\004'
|
#define COMPLETE_SEP L'\004'
|
||||||
|
|
||||||
/**
|
|
||||||
* Separator between completion and description
|
|
||||||
*/
|
|
||||||
#define COMPLETE_SEP_STR L"\004"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Character that separates the completion and description on
|
* Character that separates the completion and description on
|
||||||
* programmable completions
|
* programmable completions
|
||||||
|
@ -20,11 +20,6 @@ typedef enum
|
|||||||
ERASE
|
ERASE
|
||||||
} fish_message_type_t;
|
} 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
|
Callback data, reflecting a change in universal variables
|
||||||
*/
|
*/
|
||||||
|
@ -115,11 +115,6 @@ static bool should_test_function(const char *func_name)
|
|||||||
*/
|
*/
|
||||||
#define LAPS 50
|
#define LAPS 50
|
||||||
|
|
||||||
/**
|
|
||||||
The result of one of the test passes
|
|
||||||
*/
|
|
||||||
#define NUM_ANS L"-7 99999999 1234567 deadbeef DEADBEEFDEADBEEF"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Number of encountered errors
|
Number of encountered errors
|
||||||
*/
|
*/
|
||||||
|
12
src/output.h
12
src/output.h
@ -31,17 +31,7 @@ enum
|
|||||||
FISH_COLOR_NORMAL,
|
FISH_COLOR_NORMAL,
|
||||||
FISH_COLOR_IGNORE,
|
FISH_COLOR_IGNORE,
|
||||||
FISH_COLOR_RESET
|
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
|
Sets the fg and bg color. May be called as often as you like, since
|
||||||
|
18
src/util.cpp
18
src/util.cpp
@ -29,24 +29,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "wutil.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)
|
int wcsfilecmp(const wchar_t *a, const wchar_t *b)
|
||||||
{
|
{
|
||||||
CHECK(a, 0);
|
CHECK(a, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user