2 hdr float,floatingpoint,math,values
7 tst tmp_rmfail note{ open files cannot be removed }end execute{
19 static char data[] = "0123456789";
26 *s++ = (n & 0xF) + 'A';
27 *s++ = ((n >> 4) & 0xF) + 'A';
28 *s++ = ((n >> 8) & 0xF) + 'A';
29 *s++ = ((n >> 12) & 0xF) + 'A';
36 if (!(fw = fopen(file, "w")))
38 if (!(fr = fopen(file, "r")))
51 if (fwrite(data, sizeof(data), 1, fw) != 1)
54 if (fread(file, sizeof(data), 1, fr) != 1)
57 if (strcmp(file, data) != 0)
64 more void_int note{ voidptr is larger than int }end execute{
68 return sizeof(char*) > sizeof(int) ? 0 : 1;
72 more long_int note{ long is larger than int }end execute{
76 return sizeof(long) > sizeof(int) ? 0 : 1;
80 tst vax_asm note{ register layout ok for vax string operations }end execute{
87 register int r11, r10, r9, r8, r7, r6;
88 r11 = r10 = r9 = r8 = r7 = r6 = -1;
95 if(sizeof(int) != sizeof(char*) || r11 || r10 || r9 || r8 || r7 || r6 )
102 tst lib_cvt note{ native floating point conversions ok }end link{
104 extern char* ecvt _ARG_((double, int, int*, int*));
105 extern char* fcvt _ARG_((double, int, int*, int*));
106 extern double strtod _ARG_((const char*, char**));
118 tst xopen_stdio note{ Stdio fseek/fflush are X/Open-compliant }end execute{
119 #define Failed(file) (unlink(file),1)
125 char file[1024], buf[1024], *f, *t;
129 for(f = argv[0], t = file; (*t = *f++) != 0; )
131 *t++ = '.'; *t++ = 'D'; *t++ = 0;
132 if((fd = creat(file,0666)) < 0)
135 for (i = 0; i < sizeof(buf); ++i)
136 buf[i] = '0' + (i%10);
137 for (i = 0; i < 16; ++i)
138 if (write(fd,buf,sizeof(buf)) != sizeof(buf))
142 if(!(f1 = fopen(file,"r+")) ||
143 (fd = dup(fileno(f1))) < 0 ||
144 !(f2 = fdopen(fd,"r+")) )
147 if(fread(buf, 1, 7, f2) != 7 || ftell(f2) != 7)
150 if(fseek(f1, 1010, 0) < 0 || ftell(f1) != 1010)
153 fflush(f2); /* this should set the seek location to 1010 */
154 if(ftell(f2) != 1010)