fullscreen segv fix, popup for 4opts preview, renderfarm print fix, pan widget upgrad...
[goodguy/cinelerra.git] / cinelerra-5.1 / db / tst.C
1 #include<stdio.h>
2 #include<stdarg.h>
3 #include<time.h>
4
5 #include "tdb.h"
6 #include "s.C"
7
8 void write_pbm(uint8_t *tp, int w, int h, const char *fmt, ...)
9 {
10   va_list ap;    va_start(ap, fmt);
11   char fn[256];  vsnprintf(fn, sizeof(fn), fmt, ap);
12   va_end(ap);
13   FILE *fp = !strcmp(fn,"-") ? stdout : fopen(fn,"w");
14   if( fp ) {
15     fprintf(fp,"P5\n%d %d\n255\n",w,h);
16     fwrite(tp,w,h,fp);
17     fclose(fp);
18   }
19 }
20
21 int main(int ac, char **av)
22 {
23   int ret;  setbuf(stdout,0);
24   theDb db;
25   db.open(av[1]);
26   //db.access(av[1], 34543, 0);
27   if( !db.opened() || db.error() ) exit(1);
28
29   db.close();
30   return 0;
31 }
32