예제 #1
0
int main()
{
    printf("\n--- ASCII table ---\n");
    ascii_chart(28,38);
    
    printf("\n--- Secret message ---\n");
    secret_msg(0);
    secret_msg(1);
                
    return 0;
}
예제 #2
0
파일: main.c 프로젝트: noppud/c-course
int main()
{
    /* testing exercise 1.7 */
    printf("\n--- Exercise 1.7 ---\n");
    ascii_chart(28,38);
    
    /* testing exercise 1.8 */
    printf("\n--- Exercise 1.8 ---\n");
    secret_msg(0);
    secret_msg(1);
                
    return 0;
}
예제 #3
0
//SHORT  show_ascii_chart (void)
SHORT ascii_chart (void)
{
char str[4], *s= str;
struct view_rec *v;
DEF_HELP (ASCII_HELP,1,25,10);

NEW_HELP;
switch (ascii_chart (view_peek (), str)) {
   case 4:                                         /* character */
      v= (struct view_rec *)Mem::vmem_trans(active_view);
      sheet_addchar (v->cursor,*s);
                                       /* low-level sheet function is used
                                          so a CR or other special char will
                                          not be interpreted as special,
                                          which view_addkey() does. */
      break;
   case -1:
      break;
   default:
      view_addstring (s);
      break;
   }
OLD_HELP;
}