From 83e4837f39c313fe13970cae1f59801915c08633 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sat, 24 Jul 2010 03:12:45 +0200 Subject: [PATCH] Remove unused CHAR type and replace SIZE_T with size_t, we check for that. --- src/complete.c | 18 +++++++++--------- src/editline.c | 12 ++++++------ src/editline.h | 6 ------ 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/complete.c b/src/complete.c index 3ff11d1..80fe8e7 100644 --- a/src/complete.c +++ b/src/complete.c @@ -41,10 +41,10 @@ static int FindMatches(char *dir, char *file, char ***avp) char *p; DIR *dp; DIRENTRY *ep; - SIZE_T ac; - SIZE_T len; - SIZE_T choices; - SIZE_T total; + size_t ac; + size_t len; + size_t choices; + size_t total; if ((dp = opendir(dir)) == NULL) return 0; @@ -159,11 +159,11 @@ char *el_filename_complete(char *pathname, int *match) char *file; char *new; char *p; - SIZE_T ac; - SIZE_T end; - SIZE_T i; - SIZE_T j; - SIZE_T len; + size_t ac; + size_t end; + size_t i; + size_t j; + size_t len; if (SplitPath(pathname, &dir, &file) < 0) return NULL; diff --git a/src/editline.c b/src/editline.c index 140ad8e..e2e3bdf 100644 --- a/src/editline.c +++ b/src/editline.c @@ -99,9 +99,9 @@ static int Pushed; static int Signal; static el_keymap_t Map[]; static el_keymap_t MetaMap[]; -static SIZE_T Length; -static SIZE_T ScreenCount; -static SIZE_T ScreenSize; +static size_t Length; +static size_t ScreenCount; +static size_t ScreenSize; static char *backspace; static int tty_cols; static int tty_rows; @@ -447,7 +447,7 @@ static void clear_line(void) static el_status_t insert_string(const char *p) { - SIZE_T len; + size_t len; int i; char *new; char *q; @@ -1105,7 +1105,7 @@ static char *find_word(void) { char *p, *q; char *new; - SIZE_T len; + size_t len; p = &rl_line_buffer[rl_point]; while (p > rl_line_buffer) { @@ -1164,7 +1164,7 @@ static el_status_t c_complete(void) { char *p, *q; char *word, *new; - SIZE_T len; + size_t len; int unique; el_status_t s = 0; diff --git a/src/editline.h b/src/editline.h index ef165e2..61ecef6 100644 --- a/src/editline.h +++ b/src/editline.h @@ -53,12 +53,6 @@ # include #endif -#ifndef SIZE_T -#define SIZE_T unsigned int -#endif - -typedef unsigned char CHAR; - #define MEM_INC 64 #define SCREEN_INC 256