Ibase SMARC Evaluation Kit Manuale Utente Pagina 83

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 93
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 82
Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
57
IBASE Technology Inc.
/* 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 82
1 2 ... 78 79 80 81 82 83 84 85 86 87 88 ... 92 93

Commenti su questo manuale

Nessun commento