Ibase SMARC-EVK1 Manuale Utente Pagina 82

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 92
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 81
56
SMARC Evaluation Kit
/* Return 1 if we should continue, 0 if we should abort */
int user_ack(int def)
{
char s[2];
int ret;
if (!fgets(s, 2, stdin))
return 0; /* Nack by default */
switch (s[0]) {
case 'y':
case 'Y':
ret = 1;
break;
case 'n':
case 'N':
ret = 0;
break;
default:
ret = def;
}
/* Flush extra characters */
while (s[0] != '\n') {
int c = fgetc(stdin);
if (c == EOF) {
ret = 0;
break;
}
s[0] = c;
}
return ret;
}
/*
util - helper functions
*/
#ifndef _UTIL_H
#define _UTIL_H
extern int user_ack(int def);
#endif /* _UTIL_H */
Version.h
#define VERSION "3.1.1"
Vedere la pagina 81
1 2 ... 77 78 79 80 81 82 83 84 85 86 87 ... 91 92

Commenti su questo manuale

Nessun commento