ReactOS 0.4.16-dev-91-g764881a
main.c File Reference
#include <windows.h>
#include <tchar.h>
#include <wchar.h>
#include <stdio.h>
#include <stdlib.h>
#include "main.h"
Include dependency graph for main.c:

Go to the source code of this file.

Macros

#define WIN32_LEAN_AND_MEAN
 
#define VERSION   1
 
#define TARGET   "MBCS"
 

Functions

int usage (char *argv0)
 
int __cdecl main (int argc, char *argv[])
 
int __cdecl mainCRTStartup (void)
 

Variables

BOOL verbose_flagged = 0
 
BOOL status_flagged = 0
 
charargs [] = { "fileio.exe", "0", "unicode", "verbose"}
 

Macro Definition Documentation

◆ TARGET

#define TARGET   "MBCS"

Definition at line 38 of file main.c.

◆ VERSION

#define VERSION   1

Definition at line 33 of file main.c.

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 23 of file main.c.

Function Documentation

◆ main()

int __cdecl main ( int argc  ,
char argv[] 
)

Definition at line 65 of file main.c.

66{
67 int test_num = 0;
68 int version = 0;
69 int result = 0;
70 int i = 0;
71
72 printf("%s test application - build %03d (default: %s)\n", argv[0], VERSION, TARGET);
73 if (argc < 2) {
74 return usage(argv[0]);
75 }
76 for (i = 1; i < argc; i++) {
77 if (strstr(argv[i], "ansi") || strstr(argv[i], "ANSI")) {
78 version = 1;
79 } else if (strstr(argv[i], "unicode") || strstr(argv[i], "UNICODE")) {
80 version = 2;
81 } else if (strstr(argv[i], "clean") || strstr(argv[i], "CLEAN")) {
82 test_num = -1;
83 } else if (strstr(argv[i], "verbose") || strstr(argv[i], "VERBOSE")) {
85 } else if (strstr(argv[i], "status") || strstr(argv[i], "STATUS")) {
87 } else {
88 test_num = atoi(argv[1]);
89 //if (test_num < 0
90 }
91 }
92 for (i = test_num; i <= test_num; i++) {
93 if (!test_num) {
94 test_num = 4;
95 i = 1;
96 }
97 switch (version) {
98 case 1:
100 break;
101 case 2:
103 break;
104 default:
107 break;
108 }
109 }
110 printf("finished\n");
111 return result;
112}
static int argc
Definition: ServiceArgs.c:12
char * strstr(char *String1, char *String2)
Definition: utclib.c:653
static const WCHAR version[]
Definition: asmname.c:66
int run_ansi_tests(int test_num)
Definition: fileio.c:28
#define printf
Definition: freeldr.h:97
GLuint64EXT * result
Definition: glext.h:11304
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
BOOL status_flagged
Definition: main.c:42
#define VERSION
Definition: main.c:33
#define TARGET
Definition: main.c:38
BOOL verbose_flagged
Definition: main.c:41
#define argv
Definition: mplay32.c:18
int run_unicode_tests(int test_num)
Definition: wfileio.c:28

◆ mainCRTStartup()

int __cdecl mainCRTStartup ( void  )

Definition at line 118 of file main.c.

119{
120 main(2, args);
121 return 0;
122}
int main()
Definition: test.c:6
Definition: match.c:390

◆ usage()

int usage ( char argv0)

Definition at line 44 of file main.c.

45{
46 printf("USAGE: %s test_id [unicode]|[ansi] [clean]|[status][verbose]\n", argv0);
47 printf("\tWhere test_id is one of:\n");
48 printf("\t0 - (default) regression mode, run tests 1-4 displaying failures only\n");
49 printf("\t1 - Write DOS style eol data to file in text mode (text.dos)\n");
50 printf("\t2 - Write NIX style eol data to file in binary mode (binary.dos)\n");
51 printf("\t3 - Write DOS style eol data to file in text mode (text.nix)\n");
52 printf("\t4 - Write NIX style eol data to file in binary mode (binary.nix)\n");
53 printf("\t5 - Echo console line input\n");
54 printf("\t6 - Dump console line input in hex format\n");
55 printf("\t7 - The source code is your friend\n");
56 printf("\t[unicode] - perform tests using UNICODE versions of library functions\n");
57 printf("\t[ansi] - perform tests using ANSI versions of library functions\n");
58 printf("\t If neither unicode or ansi is specified build default is used\n");
59 printf("\t[clean] - delete all temporary test output files\n");
60 printf("\t[status] - enable extra status display while running\n");
61 printf("\t[verbose] - enable verbose output when running\n");
62 return 0;
63}
static char argv0[MAX_PATH]
Definition: shlexec.c:49

Variable Documentation

◆ args

char* args[] = { "fileio.exe", "0", "unicode", "verbose"}

Definition at line 116 of file main.c.

◆ status_flagged

BOOL status_flagged = 0

Definition at line 42 of file main.c.

Referenced by check_file_size(), create_test_file(), main(), and verify_output_file().

◆ verbose_flagged

BOOL verbose_flagged = 0

Definition at line 41 of file main.c.

Referenced by check_file_size(), main(), and test_file_truncate().