This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #ifndef _GENERATOR_H | |
| #define _GENERATOR_H | |
| #include <setjmp.h> | |
| #define GENERATOR_BEGIN() \ | |
| static jmp_buf _generator_step, \ | |
| _generator_beginning; \ | |
| static int _generator_is_first_use = 1; \ | |
| \ | |
| if (_generator_is_first_use) { \ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <stdio.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| /* printf example: progress bar */ | |
| /* by unveres, 2018 */ | |
| /* more at gist.github.com/unveres */ | |
| /* look at that 25th line of code, it shows the true power of printf */ | |
| #define BARSIZE (50) |