rendered paste body#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
#include <ccs.h>
#include <sys/time.h>
int
main(int argc, char **argv)
{
CCSContext *c;
c = ccsContextNew(NULL,0);
int i = 0;
int last;
Bool error = FALSE;
CCSSetting *s = ccsFindSetting(ccsFindPlugin(c,"core"),"hsize",TRUE,0);
CCSSetting *s2 = ccsFindSetting(ccsFindPlugin(c,"core"),"vsize",TRUE,0);
printf("Value %d %d\n",s->value->value.asInt,s2->value->value.asInt);
ccsSetInt(s,5);
ccsWriteChangedSettings(c);
while (!error && i < 100000)
{
printf("\r%d",i);
ccsProcessEvents(c,0);
if (last != s2->value->value.asInt)
printf(" %d %d\n", last, s2->value->value.asInt);
last = (random() % 20) + 1;
ccsSetInt(s2,last);
ccsWriteChangedSettings(c);
if (s->value->value.asInt != 5)
error = TRUE;
++i;
}
}