コード例 #1
0
int readDec(text_t *text)
{
  int rc = 0;
  char buf[40];
  char *str = _safe_gets(text, buf, 39);
  if(*str)
    _scanf_getl(str, &rc, 10, 11, 1); /* signed */
  return rc;
}
コード例 #2
0
ファイル: getHex.c プロジェクト: Redacacia/BlocklyProp
int readHex(text_t *text)
{
  int rc = 0;
  char buf[12];
  char *str = _safe_gets(text, buf, 12);
  if(*str)
    _scanf_getl(str, &rc, 16, 9, 0); /* not signed */
  return rc;
}
コード例 #3
0
int readBin(text_t *text)
{
  int rc = 0;
  char buf[40];
  char *str = _safe_gets(text, buf, 39);
  if(*str)
    _scanf_getl(str, &rc, 2, 32, 0); /* not signed */
  return rc;
}