[Kst] kdeextragear-2/kst/tests/dirfile_maker [POSSIBLY UNSAFE]
Barth Netterfield
netterfield at astro.utoronto.ca
Fri Aug 13 15:30:06 CEST 2004
CVS commit by netterfield:
Updates to the dirfile_maker test program:
creates an indirect curfile, dm.cur
field 'cos' is now cos(x) not sin(x)
M +7 -2 dirfile_maker.c 1.2 [POSSIBLY UNSAFE: printf]
--- kdeextragear-2/kst/tests/dirfile_maker/dirfile_maker.c #1.1:1.2
@@ -58,4 +58,9 @@ int main() {
fclose(fpf);
+ /* make curfile */
+ fpf = fopen("dm.cur", "w");
+ fprintf(fpf,"%s", dirfilename);
+ fclose(fpf);
+
while (1) {
/* write 'count' */
@@ -86,5 +91,5 @@ int main() {
for (i=0; i<df[COS].spf; i++) {
x = count*df[COS].spf+i;
- x = sin(2.0*M_PI*x/100.0);
+ x = cos(2.0*M_PI*x/100.0);
write(df[COS].fp, &x, sizeof(float));
}
More information about the Kst
mailing list