Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
schuessf committed Feb 21, 2023
1 parent cc15813 commit 0a5fe1e
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions trunk/examples/programs/regression/c/fscanf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,55 @@
Author: Frank Schüssele ([email protected])
Date: 2023-02-21
*/
#include <stdio.h>
typedef long int __off_t;
typedef long int __off64_t;
struct _IO_FILE;
typedef struct _IO_FILE __FILE;
struct _IO_FILE;
typedef struct _IO_FILE FILE;
struct _IO_FILE;
struct _IO_marker;
struct _IO_codecvt;
struct _IO_wide_data;
typedef void _IO_lock_t;
struct _IO_FILE
{
int _flags;
char *_IO_read_ptr;
char *_IO_read_end;
char *_IO_read_base;
char *_IO_write_base;
char *_IO_write_ptr;
char *_IO_write_end;
char *_IO_buf_base;
char *_IO_buf_end;
char *_IO_save_base;
char *_IO_backup_base;
char *_IO_save_end;
struct _IO_marker *_markers;
struct _IO_FILE *_chain;
int _fileno;
int _flags2;
__off_t _old_offset;
unsigned short _cur_column;
signed char _vtable_offset;
char _shortbuf[1];
_IO_lock_t *_lock;
__off64_t _offset;
struct _IO_codecvt *_codecvt;
struct _IO_wide_data *_wide_data;
struct _IO_FILE *_freeres_list;
void *_freeres_buf;
size_t __pad5;
int _mode;
char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
};
extern int fscanf (FILE *__restrict __stream,
const char *__restrict __format, ...) ;
extern FILE* stdin;

int main() {
int x;
int r = scanf("%d", &x);
int r = fscanf(stdin, "%d", &x);
//@ assert r == 1 || x == 0;
}

0 comments on commit 0a5fe1e

Please sign in to comment.