Skip to content

Commit 689e646

Browse files
authored
Update curses.d
I had a lot of problems with scanw in the past, it was difficult to find a solution but after a long time I found two solutions when programming in D I put a parameter before the program for the scanw to work but I don't remember it anymore, I found another solution on my own that was to put with "const" the scanw chars that aviates in "curse.d".
1 parent f20ae9f commit 689e646

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/deimos/ncurses/curses.d

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ int mvinsstr(N:int, C:char)(N y, N x, C* str)
554554
int mvinstr(N:int, C:char)(N y, N x, C* str)
555555
{ return mvwinstr(stdscr, y, x, str); }
556556
int mvprintw(int y, int x, const char* fmt, ...);
557-
int mvscanw(int y, int x, char* fmt, ...);
557+
int mvscanw(int y, int x, const char* fmt, ...);
558558
int mvvline(N:int, C:chtype)(N y, N x, C ch, N n)
559559
{ return mvwvline(stdscr, y, x, ch, n); }
560560
int mvwaddch(W:WINDOW, N:int, C:chtype)(W* win, N y, N x, C ch)
@@ -678,7 +678,7 @@ int mvwinstr(W:WINDOW, N:int, C:char)(W* win, N y, N x, C* str)
678678
return winstr(win, str);
679679
}
680680
int mvwprintw(WINDOW* win, int y, int x, const char* fmt, ...);
681-
int mvwscanw(WINDOW* win, int y, int x, char* fmt, ...);
681+
int mvwscanw(WINDOW* win, int y, int x, const char* fmt, ...);
682682
int mvwvline(W:WINDOW, N:int, C:chtype)(W* win, N y, N x, C ch, N n)
683683
{
684684
if(wmove(win, y, x) == ERR)
@@ -722,7 +722,7 @@ int reset_shell_mode();
722722
//TODO
723723
__gshared int function(int line, int function(WINDOW* win, int cols) init) ripoffline;
724724
int savetty();
725-
int scanw(char* fmt, ...);
725+
int scanw(const char* fmt, ...);
726726
int scr_dump(char *filename);
727727
int scr_init(char *filename);
728728
int scrl(N:int)(N n)
@@ -864,7 +864,7 @@ int wnoutrefresh(WINDOW* win);
864864
int wprintw(WINDOW* win, const char* fmt, ...);
865865
int wredrawln(WINDOW* win, int beg_line, int num_lines);
866866
int wrefresh(WINDOW* win);
867-
int wscanw(WINDOW* win, char* fmt, ...);
867+
int wscanw(WINDOW* win, const char* fmt, ...);
868868
int wscrl(WINDOW *win, int n);
869869
int wsetscrreg(WINDOW* win, int top, int bot);
870870
int wstandout(W:WINDOW)(W* win)

0 commit comments

Comments
 (0)