| 88 | } |
| 89 | |
| 90 | static int GetYN(int def) |
| 91 | { |
| 92 | char buf[32]; |
| 93 | printf("(Y/N)[%s]: ",def?"Y":"N"); |
| 94 | if ( fgets(buf,ARRAY_SIZE(buf),stdin) == nullptr ) |
| 95 | { |
| 96 | return def; |
| 97 | } |
| 98 | if(buf[0]=='y' || buf[0]=='Y') |
| 99 | return(1); |
| 100 | if(buf[0]=='n' || buf[0]=='N') |
| 101 | return(0); |
| 102 | return(def); |
| 103 | } |
| 104 | |
| 105 | /* |
| 106 | ** Begin list code. |
no outgoing calls
no test coverage detected