@@ -44,9 +44,15 @@ void list_aliases(struct string_list *list)
read_early_config(config_alias_cb, &data);
}
-#define SPLIT_CMDLINE_BAD_ENDING 1
-#define SPLIT_CMDLINE_UNCLOSED_QUOTE 2
-#define SPLIT_CMDLINE_ARGC_OVERFLOW 3
+/* #define SPLIT_CMDLINE_BAD_ENDING 1 */
+/* #define SPLIT_CMDLINE_UNCLOSED_QUOTE 2 */
+/* #define SPLIT_CMDLINE_ARGC_OVERFLOW 3 */
+enum split_cmdline_error {
+ SPLIT_CMDLINE_BAD_ENDING = 1,
+ SPLIT_CMDLINE_UNCLOSED_QUOTE,
+ SPLIT_CMDLINE_ARGC_OVERFLOW
+};
+
static const char *split_cmdline_errors[] = {
N_("cmdline ends with \\"),
N_("unclosed quote"),
@@ -205,8 +205,13 @@ struct fragment {
* or deflated "literal".
*/
#define binary_patch_method leading
-#define BINARY_DELTA_DEFLATED 1
-#define BINARY_LITERAL_DEFLATED 2
+/* #define BINARY_DELTA_DEFLATED 1 */
+/* #define BINARY_LITERAL_DEFLATED 2 */
+
+enum binary_type_deflated {
+ BINARY_DELTA_DEFLATED = 1,
+ BINARY_LITERAL_DEFLATED
+};
static void free_fragment_list(struct fragment *list)
{
@@ -918,8 +923,14 @@ static int gitdiff_hdrend(struct gitdiff_data *state UNUSED,
* their names against any previous information, just
* to make sure..
*/
-#define DIFF_OLD_NAME 0
-#define DIFF_NEW_NAME 1
+
+/* #define DIFF_OLD_NAME 0 */
+/* #define DIFF_NEW_NAME 1 */
+
+enum diff_name {
+ DIFF_OLD_NAME = 0,
+ DIFF_NEW_NAME
+};
static int gitdiff_verify_name(struct gitdiff_data *state,
const char *line,