Skip to content

Commit

Permalink
Add VOID_PARAM to definition of functions with no parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed Feb 13, 2019
1 parent 27a2e81 commit 7f62776
Show file tree
Hide file tree
Showing 28 changed files with 180 additions and 180 deletions.
34 changes: 17 additions & 17 deletions ch.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static int ch_addbuf();
* Get the character pointed to by the read pointer.
*/
int
ch_get()
ch_get(VOID_PARAM)
{
struct buf *bp;
struct bufnode *bn;
Expand Down Expand Up @@ -385,7 +385,7 @@ ch_ungetchar(c)
* If we haven't read all of standard input into it, do that now.
*/
public void
end_logfile()
end_logfile(VOID_PARAM)
{
static int tried = FALSE;

Expand All @@ -410,7 +410,7 @@ end_logfile()
* Write all the existing buffered data to the log file.
*/
public void
sync_logfile()
sync_logfile(VOID_PARAM)
{
struct buf *bp;
struct bufnode *bn;
Expand Down Expand Up @@ -508,7 +508,7 @@ ch_seek(pos)
* Seek to the end of the file.
*/
public int
ch_end_seek()
ch_end_seek(VOID_PARAM)
{
POSITION len;

Expand All @@ -535,7 +535,7 @@ ch_end_seek()
* Seek to the last position in the file that is currently buffered.
*/
public int
ch_end_buffer_seek()
ch_end_buffer_seek(VOID_PARAM)
{
struct buf *bp;
struct bufnode *bn;
Expand Down Expand Up @@ -563,7 +563,7 @@ ch_end_buffer_seek()
* beginning of the pipe is no longer buffered.
*/
public int
ch_beg_seek()
ch_beg_seek(VOID_PARAM)
{
struct bufnode *bn;
struct bufnode *firstbn;
Expand Down Expand Up @@ -595,7 +595,7 @@ ch_beg_seek()
* Return the length of the file, if known.
*/
public POSITION
ch_length()
ch_length(VOID_PARAM)
{
if (thisfile == NULL)
return (NULL_POSITION);
Expand All @@ -612,7 +612,7 @@ ch_length()
* Return the current position in the file.
*/
public POSITION
ch_tell()
ch_tell(VOID_PARAM)
{
if (thisfile == NULL)
return (NULL_POSITION);
Expand All @@ -623,7 +623,7 @@ ch_tell()
* Get the current char and post-increment the read pointer.
*/
public int
ch_forw_get()
ch_forw_get(VOID_PARAM)
{
int c;

Expand All @@ -646,7 +646,7 @@ ch_forw_get()
* Pre-decrement the read pointer and get the new current char.
*/
public int
ch_back_get()
ch_back_get(VOID_PARAM)
{
if (thisfile == NULL)
return (EOI);
Expand Down Expand Up @@ -686,7 +686,7 @@ ch_setbufspace(bufspace)
* Flush (discard) any saved file state, including buffer contents.
*/
public void
ch_flush()
ch_flush(VOID_PARAM)
{
struct bufnode *bn;

Expand Down Expand Up @@ -753,7 +753,7 @@ ch_flush()
* The buffer is added to the tail of the buffer chain.
*/
static int
ch_addbuf()
ch_addbuf(VOID_PARAM)
{
struct buf *bp;
struct bufnode *bn;
Expand All @@ -778,7 +778,7 @@ ch_addbuf()
*
*/
static void
init_hashtbl()
init_hashtbl(VOID_PARAM)
{
int h;

Expand All @@ -793,7 +793,7 @@ init_hashtbl()
* Delete all buffers for this file.
*/
static void
ch_delbufs()
ch_delbufs(VOID_PARAM)
{
struct bufnode *bn;

Expand Down Expand Up @@ -833,7 +833,7 @@ seekable(f)
* This is used after an ignore_eof read, during which the EOF may change.
*/
public void
ch_set_eof()
ch_set_eof(VOID_PARAM)
{
ch_fsize = ch_fpos;
}
Expand Down Expand Up @@ -883,7 +883,7 @@ ch_init(f, flags)
* Close a filestate.
*/
public void
ch_close()
ch_close(VOID_PARAM)
{
int keepstate = FALSE;

Expand Down Expand Up @@ -926,7 +926,7 @@ ch_close()
* Return ch_flags for the current file.
*/
public int
ch_getflags()
ch_getflags(VOID_PARAM)
{
if (thisfile == NULL)
return (0);
Expand Down
6 changes: 3 additions & 3 deletions charset.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ icharset(name, no_error)
* Define a charset, given a locale name.
*/
static void
ilocale()
ilocale(VOID_PARAM)
{
int c;

Expand Down Expand Up @@ -308,7 +308,7 @@ setfmt(s, fmtvarptr, attrptr, default_fmt)
*
*/
static void
set_charset()
set_charset(VOID_PARAM)
{
char *s;

Expand Down Expand Up @@ -388,7 +388,7 @@ set_charset()
* Initialize charset data structures.
*/
public void
init_charset()
init_charset(VOID_PARAM)
{
char *s;

Expand Down
46 changes: 23 additions & 23 deletions cmdbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static int cmd_mbc_buf_index;
* Reset command buffer (to empty).
*/
public void
cmd_reset()
cmd_reset(VOID_PARAM)
{
cp = cmdbuf;
*cp = '\0';
Expand All @@ -125,7 +125,7 @@ cmd_reset()
* Clear command line.
*/
public void
clear_cmd()
clear_cmd(VOID_PARAM)
{
cmd_col = prompt_col = 0;
cmd_mbc_buf_len = 0;
Expand Down Expand Up @@ -165,7 +165,7 @@ cmd_putstr(s)
* How many characters are in the command buffer?
*/
public int
len_cmdbuf()
len_cmdbuf(VOID_PARAM)
{
char *s = cmdbuf;
char *endline = s + strlen(s);
Expand Down Expand Up @@ -298,7 +298,7 @@ cmd_repaint(old_cp)
* and set cp to the corresponding char in cmdbuf.
*/
static void
cmd_home()
cmd_home(VOID_PARAM)
{
while (cmd_col > prompt_col)
{
Expand All @@ -317,7 +317,7 @@ cmd_home()
* Shift the cmdbuf display left a half-screen.
*/
static void
cmd_lshift()
cmd_lshift(VOID_PARAM)
{
char *s;
char *save_cp;
Expand Down Expand Up @@ -355,7 +355,7 @@ cmd_lshift()
* Shift the cmdbuf display right a half-screen.
*/
static void
cmd_rshift()
cmd_rshift(VOID_PARAM)
{
char *s;
char *save_cp;
Expand Down Expand Up @@ -385,7 +385,7 @@ cmd_rshift()
* Move cursor right one character.
*/
static int
cmd_right()
cmd_right(VOID_PARAM)
{
char *pr;
char *ncp;
Expand Down Expand Up @@ -420,7 +420,7 @@ cmd_right()
* Move cursor left one character.
*/
static int
cmd_left()
cmd_left(VOID_PARAM)
{
char *ncp;
int width = 0;
Expand Down Expand Up @@ -488,7 +488,7 @@ cmd_ichar(cs, clen)
* Delete the char to the left of the cursor.
*/
static int
cmd_erase()
cmd_erase(VOID_PARAM)
{
char *s;
int clen;
Expand Down Expand Up @@ -537,7 +537,7 @@ cmd_erase()
* Delete the char under the cursor.
*/
static int
cmd_delete()
cmd_delete(VOID_PARAM)
{
if (*cp == '\0')
{
Expand All @@ -556,7 +556,7 @@ cmd_delete()
* Delete the "word" to the left of the cursor.
*/
static int
cmd_werase()
cmd_werase(VOID_PARAM)
{
if (cp > cmdbuf && cp[-1] == ' ')
{
Expand All @@ -582,7 +582,7 @@ cmd_werase()
* Delete the "word" under the cursor.
*/
static int
cmd_wdelete()
cmd_wdelete(VOID_PARAM)
{
if (*cp == ' ')
{
Expand All @@ -608,7 +608,7 @@ cmd_wdelete()
* Delete all chars in the command buffer.
*/
static int
cmd_kill()
cmd_kill(VOID_PARAM)
{
if (cmdbuf[0] == '\0')
{
Expand Down Expand Up @@ -802,7 +802,7 @@ cmd_addhist(mlist, cmd, modified)
* Add it to the currently selected history list.
*/
public void
cmd_accept()
cmd_accept(VOID_PARAM)
{
#if CMD_HISTORY
/*
Expand Down Expand Up @@ -833,7 +833,7 @@ cmd_edit(c)
#if TAB_COMPLETE_FILENAME
#define not_in_completion() in_completion = 0
#else
#define not_in_completion()
#define not_in_completion(VOID_PARAM)
#endif

/*
Expand Down Expand Up @@ -968,7 +968,7 @@ cmd_istr(str)
* cursor at the end of the word.
*/
static char *
delimit_word()
delimit_word(VOID_PARAM)
{
char *word;
#if SPACES_IN_FILENAMES
Expand Down Expand Up @@ -1055,7 +1055,7 @@ delimit_word()
* which start with that word, and set tk_text to that list.
*/
static void
init_compl()
init_compl(VOID_PARAM)
{
char *word;
char c;
Expand Down Expand Up @@ -1357,7 +1357,7 @@ cmd_int(frac)
* Return a pointer to the command buffer.
*/
public char *
get_cmdbuf()
get_cmdbuf(VOID_PARAM)
{
return (cmdbuf);
}
Expand All @@ -1367,7 +1367,7 @@ get_cmdbuf()
* Return the last (most recent) string in the current command history.
*/
public char *
cmd_lastpattern()
cmd_lastpattern(VOID_PARAM)
{
if (curr_mlist == NULL)
return (NULL);
Expand All @@ -1392,7 +1392,7 @@ mlist_size(ml)
* Get the name of the history file.
*/
static char *
histfile_name()
histfile_name(VOID_PARAM)
{
char *home;
char *name;
Expand Down Expand Up @@ -1526,7 +1526,7 @@ addhist_init(void *uparam, struct mlist *ml, char *string)
* Initialize history from a .lesshist file.
*/
public void
init_cmdhist()
init_cmdhist(VOID_PARAM)
{
#if CMD_HISTORY
read_cmdhist(&addhist_init, NULL, 0, 0);
Expand Down Expand Up @@ -1658,7 +1658,7 @@ make_file_private(f)
* Does the history file need to be updated?
*/
static int
histfile_modified()
histfile_modified(VOID_PARAM)
{
if (mlist_search.modified)
return 1;
Expand All @@ -1677,7 +1677,7 @@ histfile_modified()
* Update the .lesshst file.
*/
public void
save_cmdhist()
save_cmdhist(VOID_PARAM)
{
#if CMD_HISTORY
char *histname;
Expand Down
Loading

0 comments on commit 7f62776

Please sign in to comment.