Chapter 27 . Programming Environments and Interfaces 715 (Web site design and hosting)

Chapter 27 . Programming Environments and Interfaces 715 routines that simplify certain parts of programming, and a variety of predefined data types and data structures. Listing 27-4 shows the same program as Listing 27-3, with appropriate updates to reflect use of S-Lang instead of ncurses. Listing 27-4: Reading Input and Writing Output with S-Lang /* * sreadkey.c - simple S-Lang-based UI */ #include #include #include int main(int argc, char *argv[]) { int i = 0; unsigned int ch; /* start s-lang */ SLtt_get_terminfo(); SLang_init_tty(-1, 0, 1); SLsmg_init_smg(); /* draw a purty border */ SLsmg_draw_box(0, 0, 24, 80); SLsmg_gotorc(1, 1); SLsmg_write_nchars( INPUT: , 7); SLsmg_refresh(); /* read characters until newline read */ while(1) { ++i; ch = SLang_getkey(); if (ch == 13) break; if (SLsmg_get_column() == 79) SLsmg_gotorc(2, 1); SLsmg_write_char(ch); SLsmg_refresh(); } /* print the character count */ SLsmg_gotorc(22, 1); SLsmg_write_nchars( characters read: , 17); SLsmg_printf( %d , i); SLsmg_refresh(); /* time to look at the screen */ sleep(3); Continued
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Leave a Reply