File: GetRepTypes.c

package info (click to toggle)
xmhtml 1.1.7-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,100 kB
  • ctags: 8,347
  • sloc: ansic: 68,063; makefile: 497; sh: 161; perl: 36
file content (87 lines) | stat: -rw-r--r-- 2,090 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef lint
static char rcsId[]="$Header: /usr/local/rcs/Newt/XmHTML/RCS/GetRepTypes.c,v 1.2 1997/08/30 02:01:49 newt Exp newt $";
#endif
/*****
* GetRepTypes.c : lists all Representation Type Converters installed by Motif.
*
* This file Version	$Revision: 1.2 $
*
* Creation date:		Fri Nov 22 01:32:07 GMT+0100 1996
* Last modification: 	$Date: 1997/08/30 02:01:49 $
* By:					$Author: newt $
* Current State:		$State: Exp $
*
* Author:				newt
* (C)Copyright 1995-1996 Ripley Software Development
* All Rights Reserved
*
* Note: there is a call to XmRegisterConvertors in here. Motif 2.0.1 doesn't
*	have this call but it is _required_ under LessTif. It is probably also
*	required if you aren't running Motif 2.X
*****/
/*****
* ChangeLog 
* $Log: GetRepTypes.c,v $
* Revision 1.2  1997/08/30 02:01:49  newt
* ?
*
* Revision 1.1  1997/03/11 20:11:06  newt
* Initial Revision
*
*****/ 
#include <stdio.h>
#include <stdlib.h>
#include <Xm/RepType.h>

/*** External Function Prototype Declarations ***/

/*** Public Variable Declarations ***/

/*** Private Datatype Declarations ****/

/*** Private Function Prototype Declarations ****/

/*** Private Variable Declarations ***/

/*****
* Name:			main
* Return Type:	void
* Description:	main for GetRepTypes
* In:
*	argc:		no of command line arguments, unused
*	argv:		array of command line arguments, unused.
* Returns:
*	EXIT_SUCCESS
*****/
int
main(int argc, char **argv)
{
	XmRepTypeList rep_types;
	int i, j;

#if defined(LESSTIF) || XmVERSION < 2
	XmRegisterConverters();
#endif

	rep_types = XmRepTypeGetRegistered();

	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("name: %s\n", 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");
	}
	XtFree((char*)rep_types);
	exit(EXIT_SUCCESS);
}