Linux sagir-us1.hostever.us 5.14.0-570.51.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 8 09:41:34 EDT 2025 x86_64
LiteSpeed
Server IP : 104.247.108.91 & Your IP : 216.73.216.105
Domains : 74 Domain
User : georgeto
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
local /
apps /
share /
readline /
Delete
Unzip
Name
Size
Permission
Date
Action
excallback.c
5.67
KB
-rw-r--r--
2015-07-02 21:16
fileman.c
11.16
KB
-rw-r--r--
2015-07-02 21:16
hist_erasedups.c
2.7
KB
-rw-r--r--
2015-07-02 21:16
hist_purgecmd.c
3.28
KB
-rw-r--r--
2015-07-02 21:16
histexamp.c
2.82
KB
-rw-r--r--
2015-07-02 21:16
manexamp.c
3.22
KB
-rw-r--r--
2015-07-02 21:16
rl-callbacktest.c
1.99
KB
-rw-r--r--
2015-07-02 21:16
rl-fgets.c
10.89
KB
-rw-r--r--
2015-07-02 21:16
rl.c
3.1
KB
-rw-r--r--
2015-07-02 21:16
rlcat.c
3.22
KB
-rw-r--r--
2015-07-02 21:16
rlevent.c
3.22
KB
-rw-r--r--
2015-07-02 21:16
rlptytest.c
6.38
KB
-rw-r--r--
2015-07-02 21:16
rltest.c
2.1
KB
-rw-r--r--
2015-07-02 21:16
rlversion.c
1.26
KB
-rw-r--r--
2015-07-02 21:16
Save
Rename
/* Standard include files. stdio.h is required. */ #include <stdlib.h> #include <unistd.h> #include <string.h> /* Used for select(2) */ #include <sys/types.h> #include <sys/select.h> #include <stdio.h> /* Standard readline include files. */ #if defined (READLINE_LIBRARY) # include "readline.h" # include "history.h" #else # include <readline/readline.h> # include <readline/history.h> #endif static void cb_linehandler (char *); int running; const char *prompt = "rltest$ "; /* Callback function called for each line when accept-line executed, EOF seen, or EOF character read. This sets a flag and returns; it could also call exit(3). */ static void cb_linehandler (char *line) { /* Can use ^D (stty eof) or `exit' to exit. */ if (line == NULL || strcmp (line, "exit") == 0) { if (line == 0) printf ("\n"); printf ("exit\n"); /* This function needs to be called to reset the terminal settings, and calling it from the line handler keeps one extra prompt from being displayed. */ rl_callback_handler_remove (); running = 0; } else { if (*line) add_history (line); printf ("input line: %s\n", line); free (line); } } int main (int c, char **v) { fd_set fds; int r; /* Install the line handler. */ rl_callback_handler_install (prompt, cb_linehandler); /* Enter a simple event loop. This waits until something is available to read on readline's input stream (defaults to standard input) and calls the builtin character read callback to read it. It does not have to modify the user's terminal settings. */ running = 1; while (running) { FD_ZERO (&fds); FD_SET (fileno (rl_instream), &fds); r = select (FD_SETSIZE, &fds, NULL, NULL, NULL); if (r < 0) { perror ("rltest: select"); rl_callback_handler_remove (); break; } if (FD_ISSET (fileno (rl_instream), &fds)) rl_callback_read_char (); } printf ("rltest: Event loop has exited\n"); return 0; }