test12.c

来自「安装DDD之前」· C语言 代码 · 共 42 行

C
42
字号
/* $Header: /cvsroot/lesstif/lesstif/test/Xm/misc/test12.c,v 1.2 2001/06/15 09:30:51 amai Exp $ */#include <stdio.h>#include <stdlib.h>#include <Xm/Xm.h>#include <Xm/RepType.h>intmain(int argc, char **argv){    XmRepTypeList rep_types;    int i, j;#ifdef LESSTIF    XmRegisterConverters(); /* necessary with LessTif */#endif    rep_types = XmRepTypeGetRegistered();    fprintf(stderr, "done calling XmRepTypeGetRegistered()\n");    printf("Representation Type Converters installed (Motif %i.%i.%i)\n",        XmVERSION, XmREVISION, XmUPDATE_LEVEL);    printf("\n-----------------\n");    for(i = 0; rep_types[i].rep_type_name != NULL; i++)    {        printf("(%i) name: %s\n", i+1, rep_types[i].rep_type_name);        printf("values:\n");        for(j = 0; j < (int)rep_types[i].num_values; j++)        {            printf("\t%s", rep_types[i].value_names[j]);            if(!((j+1) % 2))                printf("\n");        }        printf("\n-----------------\n");    }    printf("Number of converters installed: %i\n", i);    XtFree((char*)rep_types);    exit(EXIT_SUCCESS);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?