Home
last modified time | relevance | path

Searched refs:stream (Results 1 – 22 of 22) sorted by relevance

/examples/utest/testcases/posix/stdio_h/functions/
A Drename_tc.c5 FILE *stream; in rename_entry() local
6 stream = fopen("fopen_file.txt","r"); in rename_entry()
7 if(stream == NULL) in rename_entry()
9 stream = fopen("fopen_file.txt","w"); in rename_entry()
10 if(stream == NULL) in rename_entry()
15 fclose(stream); in rename_entry()
18 stream = fopen("rename_test.txt","r"); in rename_entry()
19 if(stream == NULL) in rename_entry()
23 fclose(stream); in rename_entry()
A Dremove_tc.c5 FILE *stream; in remove_entry() local
6 stream = fopen("fopen_file.txt","w"); in remove_entry()
7 if(stream) in remove_entry()
9 fclose(stream); in remove_entry()
11 stream = fopen("fopen_file.txt","r"); in remove_entry()
12 if(stream) in remove_entry()
14 fclose(stream); in remove_entry()
A Dfgetc_tc.c6 FILE *stream; in fgetc_entry() local
13 stream = fopen("fopen_file.txt","w+"); in fgetc_entry()
14 if (stream == NULL) in fgetc_entry()
21 fwrite(data, sizeof(data), 1, stream); in fgetc_entry()
22 fclose(stream); in fgetc_entry()
24 stream = fopen("fopen_file.txt","r"); in fgetc_entry()
27 getc[i] = fgetc(stream); in fgetc_entry()
29 if( feof(stream) ) in fgetc_entry()
39 fclose(stream); in fgetc_entry()
A Dfeof_tc.c6 FILE *stream; in feof_entry() local
13 stream = fopen("fopen_file.txt","w+"); in feof_entry()
14 if (stream == NULL) in feof_entry()
21 fwrite(data, sizeof(data), 1, stream); in feof_entry()
22 fclose(stream); in feof_entry()
24 stream = fopen("fopen_file.txt","r"); in feof_entry()
27 getc[i] = fgetc(stream); in feof_entry()
29 if( feof(stream) ) in feof_entry()
40 fclose(stream); in feof_entry()
A Dfgets_tc.c5 FILE *stream; in fgets_entry() local
11 stream = fopen("fopen_file.txt","w"); in fgets_entry()
12 if (stream == NULL) in fgets_entry()
18 fwrite(data, sizeof(data), 1, stream); in fgets_entry()
19 fclose(stream); in fgets_entry()
21 stream = fopen("fopen_file.txt","r"); in fgets_entry()
22 if (stream == NULL) in fgets_entry()
28 fgets(gets, sizeof(gets), stream); in fgets_entry()
34 fclose(stream); in fgets_entry()
A Dvfprintf_tc.c5 static void WriteFrmtd(FILE *stream ,char *format, ...) in WriteFrmtd() argument
10 vfprintf(stream, format, args); in WriteFrmtd()
19 FILE *stream = fopen("fopen_file.txt", "w"); in vfprintf_entry() local
20 if(stream) in vfprintf_entry()
22 WriteFrmtd(stream, "vfprintf test:%s-%d-%c %.02f 0x%x","2021" ,8 ,'1' ,3.14 ,0xff); in vfprintf_entry()
23 fclose(stream); in vfprintf_entry()
25 stream = fopen("fopen_file.txt","r"); in vfprintf_entry()
26 fread(buf, 1, sizeof(test_data), stream); in vfprintf_entry()
31 fclose(stream); in vfprintf_entry()
A Drewind_tc.c10 FILE* stream = fopen("fopen_file.txt","w+"); in rewind_entry() local
11 if(stream == NULL) in rewind_entry()
18 fprintf(stream,"%s %d %c","a_string",6500,'x'); in rewind_entry()
19 rewind(stream); in rewind_entry()
20 fscanf(stream,"%s",s); in rewind_entry()
21 fscanf(stream,"%ld",&l); in rewind_entry()
22 fscanf(stream," %c",&c); in rewind_entry()
29 fclose(stream); in rewind_entry()
A Dfputc_tc.c5 FILE *stream; in fputc_entry() local
11 stream = fopen("fopen_file.txt","w"); in fputc_entry()
12 if (stream == NULL) in fputc_entry()
18 fputc(ch, stream); in fputc_entry()
19 fclose(stream); in fputc_entry()
21 stream = fopen("fopen_file.txt","r"); in fputc_entry()
22 getc = fgetc(stream); in fputc_entry()
30 fclose(stream); in fputc_entry()
A Dfscanf_tc.c10 FILE* stream = fopen("fopen_file.txt","w+"); in fscanf_entry() local
11 if(stream == NULL) in fscanf_entry()
18 fprintf(stream,"%s %d %c","a_string",6500,'x'); in fscanf_entry()
19 fseek(stream,0L,SEEK_SET); in fscanf_entry()
20 fscanf(stream,"%s",s); in fscanf_entry()
21 fscanf(stream,"%ld",&l); in fscanf_entry()
22 fscanf(stream," %c",&c); in fscanf_entry()
29 fclose(stream); in fscanf_entry()
A Dputc_tc.c5 FILE *stream; in putc_entry() local
11 stream = fopen("fopen_file.txt","w"); in putc_entry()
12 if (stream == NULL) in putc_entry()
18 putc(ch, stream); in putc_entry()
19 fclose(stream); in putc_entry()
21 stream = fopen("fopen_file.txt","r"); in putc_entry()
22 getc = fgetc(stream); in putc_entry()
30 fclose(stream); in putc_entry()
A Dfread_tc.c7 FILE *stream; in fread_entry() local
13 stream = fopen("fopen_file.txt","w"); in fread_entry()
14 if (stream == NULL) in fread_entry()
20 fwrite(data, sizeof(data), 1, stream); in fread_entry()
21 fclose(stream); in fread_entry()
23 stream = fopen("fopen_file.txt","r"); in fread_entry()
24 fread(gets, sizeof(gets), 1, stream); in fread_entry()
30 fclose(stream); in fread_entry()
A Dfseek_tc.c10 FILE* stream = fopen("fopen_file.txt","w+"); in fdopen_entry() local
11 if(stream == NULL) in fdopen_entry()
18 fprintf(stream,"%s %d %c","a_string",6500,'x'); in fdopen_entry()
19 fseek(stream,0L,SEEK_SET); in fdopen_entry()
20 fscanf(stream,"%s",s); in fdopen_entry()
21 fscanf(stream,"%ld",&l); in fdopen_entry()
22 fscanf(stream," %c",&c); in fdopen_entry()
29 fclose(stream); in fdopen_entry()
A Dfprintf_tc.c6 FILE *stream; in fdopen_entry() local
12 stream = fopen("fopen_file.txt","w"); in fdopen_entry()
13 if (stream == NULL) in fdopen_entry()
19 fprintf(stream, "%d%c%d%c%s",1,'a',2,'b',"xx"); in fdopen_entry()
20 fclose(stream); in fdopen_entry()
22 stream = fopen("fopen_file.txt","r"); in fdopen_entry()
23 fgets(gets, sizeof(gets), stream); in fdopen_entry()
31 fclose(stream); in fdopen_entry()
A Dfputs_tc.c6 FILE *stream; in fputs_entry() local
12 stream = fopen("fopen_file.txt","w"); in fputs_entry()
13 if (stream == NULL) in fputs_entry()
19 fputs(test_data, stream); in fputs_entry()
20 fclose(stream); in fputs_entry()
22 stream = fopen("fopen_file.txt","r"); in fputs_entry()
23 fgets(gets, sizeof(gets), stream); in fputs_entry()
31 fclose(stream); in fputs_entry()
A Dfwrite_tc.c6 FILE *stream; in fwrite_entry() local
12 stream = fopen("fopen_file.txt","w"); in fwrite_entry()
13 if (stream == NULL) in fwrite_entry()
19 fwrite(test_data, sizeof(test_data), 1,stream); in fwrite_entry()
20 fclose(stream); in fwrite_entry()
22 stream = fopen("fopen_file.txt","r"); in fwrite_entry()
23 fgets(gets, sizeof(gets), stream); in fwrite_entry()
31 fclose(stream); in fwrite_entry()
A Dftell_tc.c6 FILE *stream; in ftell_entry() local
10 stream = fopen("fopen_file.txt","w"); in ftell_entry()
11 if (stream == NULL) in ftell_entry()
18 fprintf(stream, "%s",str); in ftell_entry()
19 if(ftell(stream) != strlen(str)) in ftell_entry()
23 fclose(stream); in ftell_entry()
A Dsetbuf_tc.c7 FILE *stream; in setbuf_entry() local
11 stream = fopen("fopen_file.txt","w"); in setbuf_entry()
12 if (stream == NULL) in setbuf_entry()
18 setbuf(stream, outbuf); in setbuf_entry()
19 fwrite(test_data, sizeof(test_data), 1,stream); in setbuf_entry()
26 fclose(stream); in setbuf_entry()
A Dsetvbuf_tc.c7 FILE *stream; in setvbuf_entry() local
11 stream = fopen("fopen_file.txt","w"); in setvbuf_entry()
12 if (stream == NULL) in setvbuf_entry()
18 setvbuf(stream, outbuf, _IOLBF, BUFSIZ); in setvbuf_entry()
19 fwrite(test_data, sizeof(test_data), 1,stream); in setvbuf_entry()
27 fclose(stream); in setvbuf_entry()
A Dfopen_tc.c5 FILE *stream; in fopen_entry() local
7 stream = fopen("fopen_file.txt","a+"); in fopen_entry()
8 if (stream == NULL) in fopen_entry()
14 fclose(stream); in fopen_entry()
A Dfclose_tc.c5 FILE *stream; in fclose_entry() local
6 stream = fopen("fopen_file.txt","a+"); in fclose_entry()
7 if (stream == NULL) in fclose_entry()
12 if(fclose(stream) != 0) in fclose_entry()
A Dperror_tc.c5 FILE *stream; in perror_entry() local
6 stream = fopen( "nulltest.txt", "r" ); in perror_entry()
7 if(stream == NULL) in perror_entry()
13 fclose(stream); in perror_entry()
A Dfdopen_tc.c8 FILE *stream; in fdopen_entry() local
18 stream = fdopen(fd, "w"); in fdopen_entry()
19 if (stream == NULL) in fdopen_entry()
25 fclose(stream); in fdopen_entry()

Completed in 23 milliseconds