ansi'ify the code
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15416 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -63,7 +63,7 @@ typedef enum _CASE { | ||||
| */ | ||||
| typedef struct _KEYMAP { | ||||
|     unsigned char	Key; | ||||
|     el_STATUS	(*Function)(); | ||||
|     el_STATUS	(*Function)(void); | ||||
| } KEYMAP; | ||||
|  | ||||
| /* | ||||
| @@ -124,7 +124,7 @@ int	tgetnum(const char*); | ||||
| */ | ||||
|  | ||||
| static void | ||||
| TTYflush() | ||||
| TTYflush(void) | ||||
| { | ||||
|     if (ScreenCount) { | ||||
| 	write(1, Screen, ScreenCount); | ||||
| @@ -177,7 +177,7 @@ TTYstring(unsigned char *p) | ||||
| } | ||||
|  | ||||
| static int | ||||
| TTYget() | ||||
| TTYget(void) | ||||
| { | ||||
|     unsigned char c; | ||||
|     int e; | ||||
| @@ -214,7 +214,7 @@ TTYbackn(int n) | ||||
| } | ||||
|  | ||||
| static void | ||||
| TTYinfo() | ||||
| TTYinfo(void) | ||||
| { | ||||
|     static int		init; | ||||
|     const char		*term; | ||||
| @@ -302,7 +302,7 @@ columns(int ac, unsigned char **av) | ||||
| } | ||||
|  | ||||
| static void | ||||
| reposition() | ||||
| reposition(void) | ||||
| { | ||||
|     int		i; | ||||
|     unsigned char	*p; | ||||
| @@ -338,7 +338,7 @@ right(el_STATUS Change) | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| ring_bell() | ||||
| ring_bell(void) | ||||
| { | ||||
|     TTYput('\07'); | ||||
|     TTYflush(); | ||||
| @@ -415,19 +415,19 @@ do_case(CASE type) | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| case_down_word() | ||||
| case_down_word(void) | ||||
| { | ||||
|     return do_case(TOlower); | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| case_up_word() | ||||
| case_up_word(void) | ||||
| { | ||||
|     return do_case(TOupper); | ||||
| } | ||||
|  | ||||
| static void | ||||
| ceol() | ||||
| ceol(void) | ||||
| { | ||||
|     int		extras; | ||||
|     int		i; | ||||
| @@ -451,7 +451,7 @@ ceol() | ||||
| } | ||||
|  | ||||
| static void | ||||
| clear_line() | ||||
| clear_line(void) | ||||
| { | ||||
|     Point = -strlen(Prompt); | ||||
|     TTYput('\r'); | ||||
| @@ -494,13 +494,13 @@ insert_string(unsigned char *p) | ||||
|  | ||||
|  | ||||
| static unsigned char * | ||||
| next_hist() | ||||
| next_hist(void) | ||||
| { | ||||
|     return H.Pos >= H.Size - 1 ? NULL : H.Lines[++H.Pos]; | ||||
| } | ||||
|  | ||||
| static unsigned char * | ||||
| prev_hist() | ||||
| prev_hist(void) | ||||
| { | ||||
|     return H.Pos == 0 ? NULL : H.Lines[--H.Pos]; | ||||
| } | ||||
| @@ -518,7 +518,7 @@ do_insert_hist(unsigned char *p) | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| do_hist(unsigned char *(*move)()) | ||||
| do_hist(unsigned char *(*move)(void)) | ||||
| { | ||||
|     unsigned char	*p; | ||||
|     int		i; | ||||
| @@ -532,25 +532,25 @@ do_hist(unsigned char *(*move)()) | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| h_next() | ||||
| h_next(void) | ||||
| { | ||||
|     return do_hist(next_hist); | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| h_prev() | ||||
| h_prev(void) | ||||
| { | ||||
|     return do_hist(prev_hist); | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| h_first() | ||||
| h_first(void) | ||||
| { | ||||
|     return do_insert_hist(H.Lines[H.Pos = 0]); | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| h_last() | ||||
| h_last(void) | ||||
| { | ||||
|     return do_insert_hist(H.Lines[H.Pos = H.Size - 1]); | ||||
| } | ||||
| @@ -559,9 +559,9 @@ h_last() | ||||
| **  Return zero if pat appears as a substring in text. | ||||
| */ | ||||
| static int | ||||
| substrcmp(char *text, char *pat, int len) | ||||
| substrcmp(const char *text, const char *pat, size_t len) | ||||
| { | ||||
|     unsigned char	c; | ||||
|     char	c; | ||||
|  | ||||
|     if ((c = *pat) == '\0') | ||||
|         return *text == '\0'; | ||||
| @@ -572,12 +572,12 @@ substrcmp(char *text, char *pat, int len) | ||||
| } | ||||
|  | ||||
| static unsigned char * | ||||
| search_hist(unsigned char *search, unsigned char *(*move)()) | ||||
| search_hist(unsigned char *search, unsigned char *(*move)(void)) | ||||
| { | ||||
|     static unsigned char	*old_search; | ||||
|     int		len; | ||||
|     int		pos; | ||||
|     int		(*match)(); | ||||
|     int		(*match)(const char *, const char *, size_t); | ||||
|     char	*pat; | ||||
|  | ||||
|     /* Save or get remembered search pattern. */ | ||||
| @@ -611,11 +611,11 @@ search_hist(unsigned char *search, unsigned char *(*move)()) | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| h_search() | ||||
| h_search(void) | ||||
| { | ||||
|     static int	Searching; | ||||
|     const char	*old_prompt; | ||||
|     unsigned char	*(*move)(); | ||||
|     unsigned char	*(*move)(void); | ||||
|     unsigned char	*p; | ||||
|  | ||||
|     if (Searching) | ||||
| @@ -637,7 +637,7 @@ h_search() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| fd_char() | ||||
| fd_char(void) | ||||
| { | ||||
|     int		i; | ||||
|  | ||||
| @@ -710,7 +710,7 @@ delete_string(int count) | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| bk_char() | ||||
| bk_char(void) | ||||
| { | ||||
|     int		i; | ||||
|  | ||||
| @@ -725,7 +725,7 @@ bk_char() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| bk_del_char() | ||||
| bk_del_char(void) | ||||
| { | ||||
|     int		i; | ||||
|  | ||||
| @@ -740,7 +740,7 @@ bk_del_char() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| redisplay() | ||||
| redisplay(void) | ||||
| { | ||||
|     TTYputs(NEWLINE); | ||||
|     TTYputs(Prompt); | ||||
| @@ -749,7 +749,7 @@ redisplay() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| kill_line() | ||||
| kill_line(void) | ||||
| { | ||||
|     int		i; | ||||
|  | ||||
| @@ -801,7 +801,7 @@ insert_char(int c) | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| meta() | ||||
| meta(void) | ||||
| { | ||||
|     unsigned int	c; | ||||
|     KEYMAP		*kp; | ||||
| @@ -885,7 +885,7 @@ TTYspecial(unsigned int c) | ||||
| } | ||||
|  | ||||
| static unsigned char * | ||||
| editinput() | ||||
| editinput(void) | ||||
| { | ||||
|     unsigned int	c; | ||||
|  | ||||
| @@ -998,7 +998,7 @@ add_history(char *p) | ||||
|  | ||||
|  | ||||
| static el_STATUS | ||||
| beg_line() | ||||
| beg_line(void) | ||||
| { | ||||
|     if (Point) { | ||||
| 	Point = 0; | ||||
| @@ -1008,13 +1008,13 @@ beg_line() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| del_char() | ||||
| del_char(void) | ||||
| { | ||||
|     return delete_string(Repeat == NO_ARG ? 1 : Repeat); | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| end_line() | ||||
| end_line(void) | ||||
| { | ||||
|     if (Point != End) { | ||||
| 	Point = End; | ||||
| @@ -1028,7 +1028,7 @@ end_line() | ||||
| **  allocated copy of it. | ||||
| */ | ||||
| static unsigned char * | ||||
| find_word() | ||||
| find_word(void) | ||||
| { | ||||
|     static char	SEPS[] = "#;&|^$=`'{}()<>\n\t "; | ||||
|     unsigned char	*p; | ||||
| @@ -1046,7 +1046,7 @@ find_word() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| c_complete() | ||||
| c_complete(void) | ||||
| { | ||||
|     unsigned char	*p; | ||||
|     unsigned char	*word; | ||||
| @@ -1068,7 +1068,7 @@ c_complete() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| c_possible() | ||||
| c_possible(void) | ||||
| { | ||||
|     unsigned char	**av; | ||||
|     unsigned char	*word; | ||||
| @@ -1089,14 +1089,14 @@ c_possible() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| accept_line() | ||||
| accept_line(void) | ||||
| { | ||||
|     Line[End] = '\0'; | ||||
|     return CSdone; | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| transpose() | ||||
| transpose(void) | ||||
| { | ||||
|     unsigned char	c; | ||||
|  | ||||
| @@ -1114,7 +1114,7 @@ transpose() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| quote() | ||||
| quote(void) | ||||
| { | ||||
|     unsigned int	c; | ||||
|  | ||||
| @@ -1122,7 +1122,7 @@ quote() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| wipe() | ||||
| wipe(void) | ||||
| { | ||||
|     int		i; | ||||
|  | ||||
| @@ -1140,14 +1140,14 @@ wipe() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| mk_set() | ||||
| mk_set(void) | ||||
| { | ||||
|     Mark = Point; | ||||
|     return CSstay; | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| exchange() | ||||
| exchange(void) | ||||
| { | ||||
|     unsigned int	c; | ||||
|  | ||||
| @@ -1163,7 +1163,7 @@ exchange() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| yank() | ||||
| yank(void) | ||||
| { | ||||
|     if (Yanked && *Yanked) | ||||
| 	return insert_string(Yanked); | ||||
| @@ -1171,7 +1171,7 @@ yank() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| copy_region() | ||||
| copy_region(void) | ||||
| { | ||||
|     if (Mark > End) | ||||
| 	return ring_bell(); | ||||
| @@ -1185,7 +1185,7 @@ copy_region() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| move_to_char() | ||||
| move_to_char(void) | ||||
| { | ||||
|     unsigned int	c; | ||||
|     int			i; | ||||
| @@ -1202,13 +1202,13 @@ move_to_char() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| fd_word() | ||||
| fd_word(void) | ||||
| { | ||||
|     return do_forward(CSmove); | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| fd_kill_word() | ||||
| fd_kill_word(void) | ||||
| { | ||||
|     int		i; | ||||
|  | ||||
| @@ -1222,7 +1222,7 @@ fd_kill_word() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| bk_word() | ||||
| bk_word(void) | ||||
| { | ||||
|     int		i; | ||||
|     unsigned char	*p; | ||||
| @@ -1243,7 +1243,7 @@ bk_word() | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| bk_kill_word() | ||||
| bk_kill_word(void) | ||||
| { | ||||
|     bk_word(); | ||||
|     if (OldPoint != Point) | ||||
| @@ -1296,7 +1296,7 @@ argify(unsigned char *line, unsigned char ***avp) | ||||
| } | ||||
|  | ||||
| static el_STATUS | ||||
| last_argument() | ||||
| last_argument(void) | ||||
| { | ||||
|     unsigned char	**av; | ||||
|     unsigned char	*p; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Love Hörnquist Åstrand
					Love Hörnquist Åstrand