From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 15-FEB-1991 20:40:58.50
To:	ARISIA::EVERHART
CC:	
Subj:	Re: VMS xlsfonts equivelent??

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.83)
	 id AA28763; Fri, 15 Feb 91 19:27:37 EST
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Fri, 15 FEB 91 11:01:38 PST
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA08318; Fri, 15 Feb 91 10:50:23 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 14 Feb 91 01:34:59 GMT
From: fub!geminix.in-berlin.de!tertius.in-berlin.de!frank_b@uunet.uu.net
Subject: Re: VMS xlsfonts equivelent??
Message-Id: <1991Feb14.013459.6422@tertius.in-berlin.de>
References: <491@eiffel.UUCP>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

In article <491@eiffel.UUCP>, nosmo@eiffel.UUCP (Vince Kraemer) writes:
> What is the VMS equivelent for the UNIX command xlsfonts on a VAXStation
> running DECWindows?
Sorry, could not mail my answer, so i sent it with followup

  i don't know wether this piece of code is equivalent to xlstfonts,
  but maybe it helps. 
  it just shows the availiable fonts by name and allows you to 
  preselect fonts using wildcards like

$ mc sys$login:listfonts *bitstream*--14*
-Bitstream-Dutch 801-Medium-R-Normal--14-100-100-100-P-107-DEC-DECmath_Symbol
that's it
$

-- cut here -- 
/*-- listfonts.c by L.U.S.T/Berlin --

 compilation
  $ cc listfonts.c
  $ link listfonts,sys$input/opt
  sys$share:decw$dwtlibshr/share
  CTRL/Z

 usage 
  $ listfonts :== $<full pathname>listfonts 
  $ listfonts <fontmask> 
 or
  $ mc <full pathname>listfonts <fontmask>   */
  
#include <stdlib.h>
#include <decw$include/Xlib.h>

main(argc,argv)
 char **argv;
 int argc;
{
 Display *dpy;
 char **fonts;
 int font_c;

 if ((dpy = XOpenDisplay(0)) == NULL)
 { 
  printf("No XWINDOW availiable\n");
  exit(1); 
 }
 if (argc==0)
  fonts = XListFonts(dpy,"*",1000,&font_c);
 else
  fonts = XListFonts(dpy,argv[1],1000,&font_c);
 for(--font_c;font_c>0;font_c--) printf("%s\n",fonts[font_c]);
 printf("that's it\n");
 XFreeFontNames(fonts);
 XCloseDisplay(dpy);
}

