DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T x

⟦2cbb6a276⟧ TextFile

    Length: 1463 (0x5b7)
    Types: TextFile
    Names: »xdumpfp.c«

Derivation

└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3
    └─ ⟦fc9b38f02⟧ »DATA« 
        └─⟦8e9e227a9⟧ 
            └─⟦0b3b13f5b⟧ 
                └─ ⟦this⟧ »./xdumpfp.c« 
└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3
    └─ ⟦fc9b38f02⟧ »DATA« 
        └─⟦8e9e227a9⟧ 
            └─⟦e9895db93⟧ 
                └─ ⟦this⟧ »./xdumpfp.c« 

TextFile

/******************************************************************************
 * Description
 *	Connect to a display and dump the current font path.
 *****************************************************************************/


#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <stdio.h>

#define TRUE  1
#define FALSE 0

char *ProgramName;
Display *dpy;

static char *help_message[] = {
"where options include:",
"    -display host:dpy                X server to use",
NULL};

/******************************************************************************
 * Description
 *	Main routine.  Process command-line arguments, then get the info.
 *****************************************************************************/

main(argc, argv)
int argc;
char **argv;
{
	char *display = NULL;

	/* Process arguments: */

	while (*++argv) {
		if (!strcmp (*argv, "-display")) {
			display = *++argv;
		}
		else {	/* unknown arg */
		    char **cpp;

		    fprintf (stderr, "usage:  %s [-options]\n\n", argv[0]);
		    for (cpp = help_message; *cpp; cpp++) {
			fprintf (stderr, "%s\n", *cpp);
		    }
		    fprintf (stderr, "\n");
		    exit (1);
		}
	}
	if (!(dpy= XOpenDisplay(display))) {
		perror("Cannot open display\n"); 
		exit(-1);
	      }

	{   int	  	  NPaths;
	    char	**FP = XGetFontPath( dpy, &NPaths );
	    int		  i;
	    
	    for (i = 0; i < NPaths; ++i) {
		printf( "%s\n", FP[i] );
	    }
	}

	XCloseDisplay(dpy);
}