Skip to content

Commit

Permalink
Rename clear to clear_screen to avoid conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
LegalizeAdulthood committed Feb 24, 2024
1 parent d992a72 commit 5f41cbd
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions libtrn/art.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ page_switch_result page_switch()
fgets(g_buf, sizeof g_buf, stdin);
}
#endif
clear();
clear_screen();
g_do_fseek = true;
g_artline = g_topline;
if (g_artline < 0)
Expand Down Expand Up @@ -901,7 +901,7 @@ page_switch_result page_switch()
if (g_erase_each_line)
home_cursor();
else
clear();
clear_screen();

g_do_fseek = true; /* reposition article file */
if (*g_buf == 'B')
Expand Down Expand Up @@ -1025,7 +1025,7 @@ page_switch_result page_switch()
if (g_erase_each_line)
home_cursor();
else
clear(); /* clear screen */
clear_screen(); /* clear screen */
fflush(stdout);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion libtrn/kfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ void kill_unwanted(ART_NUM starting, const char *message, int entering)
s_exitcmds = false;
ART_NUM oldfirst = g_firstart;
g_firstart = starting;
clear();
clear_screen();
if (message && (g_verbose || entering))
fputs(message,stdout) FLUSH;

Expand Down
8 changes: 4 additions & 4 deletions libtrn/ng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ do_newsgroup_result do_newsgroup(char *start_command)
goto article_level;
}
if (g_erase_screen)
clear(); /* clear the screen */
clear_screen(); /* clear the screen */
else {
fputs("\n\n",stdout) FLUSH;
termdown(2);
Expand Down Expand Up @@ -352,7 +352,7 @@ do_newsgroup_result do_newsgroup(char *start_command)
g_topline = -1; /* and remember top line of screen */
/* (line # within article file) */
}
clear(); /* clear screen */
clear_screen(); /* clear screen */
if (g_art == 0 && g_artp && g_artp->msgid && (g_datasrc->flags&DF_REMOTE)
&& !(g_artp->flags & AF_CACHED)) {
g_art = nntp_stat_id(g_artp->msgid);
Expand Down Expand Up @@ -1206,7 +1206,7 @@ static art_switch_result art_switch()
refresh_screen:
if (g_art <= g_lastart) {
g_reread = true;
clear();
clear_screen();
g_do_fseek = true;
g_artline = g_topline;
if (g_artline < 0)
Expand Down Expand Up @@ -1245,7 +1245,7 @@ static art_switch_result art_switch()
ART_LINE target;

g_reread = true;
clear();
clear_screen();
g_do_fseek = true;
if (*g_buf == 'B')
target = g_topline - 1;
Expand Down
4 changes: 2 additions & 2 deletions libtrn/ngdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void sort_newsgroups()
void ng_skip()
{
if (g_datasrc->flags & DF_REMOTE) {
clear();
clear_screen();
if (g_verbose)
fputs("Skipping unavailable article\n",stdout);
else
Expand Down Expand Up @@ -276,7 +276,7 @@ void ng_skip()
else
{
if (errno != ENOENT) { /* has it not been deleted? */
clear();
clear_screen();
if (g_verbose)
printf("\n(Article %ld exists but is unreadable.)\n",(long)g_art)
FLUSH;
Expand Down
2 changes: 1 addition & 1 deletion libtrn/rt-page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ void display_page_title(bool home_only)
if (home_only || (g_erase_screen && g_erase_each_line))
home_cursor();
else
clear();
clear_screen();
if (g_sel_mode == SM_MULTIRC)
color_string(COLOR_HEADING,"Newsrcs");
else if (g_sel_mode == SM_OPTIONS)
Expand Down
2 changes: 1 addition & 1 deletion libtrn/scanart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@ void sa_cleanup()
return;

sa_cleanmain();
clear(); /* should something else clear the screen? */
clear_screen(); /* should something else clear the screen? */
g_sa_initialized = false; /* goodbye... */
}
2 changes: 1 addition & 1 deletion libtrn/sdisp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void s_rub_ptr()
void s_refresh()
{
if (g_s_ref_all) {
clear(); /* make a clean slate */
clear_screen(); /* make a clean slate */
g_s_ref_desc = 0;
g_s_ref_status = 0;
}
Expand Down
6 changes: 3 additions & 3 deletions libtrn/terminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ int get_anything()
else {
g_page_line = 1;
if (g_erase_screen) /* -e? */
clear(); /* clear screen */
clear_screen(); /* clear screen */
else
erase_line(false); /* erase the prompt */
}
Expand Down Expand Up @@ -1603,7 +1603,7 @@ void page_start()
{
g_page_line = 1;
if (g_erase_screen)
clear();
clear_screen();
else
output_newline();
}
Expand Down Expand Up @@ -1683,7 +1683,7 @@ void erase_line(bool to_eos)
fflush(stdout);
}

void clear()
void clear_screen()
{
g_term_line = 0;
g_term_col = 0;
Expand Down
2 changes: 1 addition & 1 deletion libtrn/terminal.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void printcmd();
void rubout();
void reprint();
void erase_line(bool to_eos);
void clear();
void clear_screen();
void home_cursor();
void goto_xy(int to_col, int to_line);
#ifdef SIGWINCH
Expand Down

0 comments on commit 5f41cbd

Please sign in to comment.