example_c.c (625B)
1 #include <stdio.h> 2 #include <stdlib.h> 3 4 #include "demo_menu.h" 5 #include "stamen/stamen.h" 6 7 int operation1(size_t unused) 8 { 9 (void)unused; 10 11 printf("operation 1\n"); 12 printf("Some operation is done\n"); 13 return 1; 14 } 15 16 int operation2(size_t unused) 17 { 18 (void)unused; 19 20 printf("operation 2\n"); 21 printf("Some other operation is done\n"); 22 return 1; 23 } 24 25 int operation3(size_t unused) 26 { 27 (void)unused; 28 29 printf("operation 3\n"); 30 printf("Yet another operation is done\n"); 31 return 1; 32 } 33 34 int finish(size_t unused) 35 { 36 (void)unused; 37 38 printf("finishing...\n"); 39 exit(0); 40 } 41 42 int main(void) 43 { 44 menu_main(0); 45 return 0; 46 }