stamen

Static Menu Generator
git clone git://git.dimitrijedobrota.com/stamen.git
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING

example_c.c (625B)


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