1 /* $Header: /cvsroot/lesstif/lesstif/test/Xm/misc/test12.c,v 1.2 2001/06/15 09:30:51 amai Exp $ */
2 
3 #include <stdio.h>
4 #include <stdlib.h>
5 
6 #include <Xm/Xm.h>
7 #include <Xm/RepType.h>
8 
9 int
main(int argc,char ** argv)10 main(int argc, char **argv)
11 {
12     XmRepTypeList rep_types;
13     int i, j;
14 
15 #ifdef LESSTIF
16     XmRegisterConverters(); /* necessary with LessTif */
17 #endif
18     rep_types = XmRepTypeGetRegistered();
19 
20     fprintf(stderr, "done calling XmRepTypeGetRegistered()\n");
21 
22     printf("Representation Type Converters installed (Motif %i.%i.%i)\n",
23         XmVERSION, XmREVISION, XmUPDATE_LEVEL);
24 
25     printf("\n-----------------\n");
26     for(i = 0; rep_types[i].rep_type_name != NULL; i++)
27     {
28         printf("(%i) name: %s\n", i+1, rep_types[i].rep_type_name);
29         printf("values:\n");
30         for(j = 0; j < (int)rep_types[i].num_values; j++)
31         {
32             printf("\t%s", rep_types[i].value_names[j]);
33             if(!((j+1) % 2))
34                 printf("\n");
35         }
36         printf("\n-----------------\n");
37     }
38     printf("Number of converters installed: %i\n", i);
39     XtFree((char*)rep_types);
40     exit(EXIT_SUCCESS);
41 }
42