9 From:	SMTP%"zinser@axp602.gsi.de"  1-FEB-1999 10:51:03.22  To:	PMOREAU@CENA.DGAC.FR CC:	 Subj:	ASclock 1.0    Hello Patrick!  : 	I guess it is still early enough to wish you a good 1999!8 	The new Web-interface to your server looks really good.; 	I've fetched your asclock port from there, which does work > 	really fine, but also has some rough edges still in the code ? 	(esp. with DEC C > 5.7 and OpenVMS 7.1). The diff below shows  ? 	some changes I've made to smooth them. Also included is a new  < 	make.com, which does all of the Compiler/option file stuff 5 	automatically and should be much easier to maintein.  	  						Greetings, Martin  						  & *** asclock.c	Wed Jan 20 14:07:56 1999+ --- asclock.c.orig	Tue Jan 19 14:39:55 1999  *************** 
 *** 1,19 ****    #include <stdio.h> - #include <stdlib.h>    #include <X11/Xlib.h>    #include <X11/xpm.h>#   #include <X11/extensions/shape.h>    #include <time.h>    #include <X11/Xatom.h>    - #ifdef VMS - #include <string.h>  - #include <unistd.h>  - #if __CRTL_VER < 70000000  - int usleep(unsigned);  - #endif - #endif -    #include "clk.xpm"   #include "led.xpm"   #include "month.xpm"
 --- 1,15 ----    #include <stdio.h>   #include <X11/Xlib.h> 
 + #ifndef vms    #include <X11/xpm.h>#   #include <X11/extensions/shape.h>  + #else  + #include "xpm.h"8 + #include "sys$common:[decw$include.extensions]shape.h" + #endif   #include <time.h>    #include <X11/Xatom.h>      #include "clk.xpm"   #include "led.xpm"   #include "month.xpm" ***************  *** 27,34 ****,   int ITBLINKS=1;  /* default is blinking */1   int ICONIFIED=0; /* default is not iconified */ Q   /* led positions *************************************************************/ + ! int twelve_pos[5]  = {5, 14, 24, 28, 37}; + ! int twfour_pos[5]  = {4,  8, 17, 22, 31};    /* with shape */7   int ws_posx[11] = {0,0,0,0,0,40, 17, 17, 22, 27, 15}; $   int ws_posy[4]  = {3, 21, 30, 45}; --- 23,30 ----,   int ITBLINKS=1;  /* default is blinking */1   int ICONIFIED=0; /* default is not iconified */ Q   /* led positions *************************************************************/ ' ! int twelve[5]  = {5, 14, 24, 28, 37}; ' ! int twfour[5]  = {4,  8, 17, 22, 31};    /* with shape */7   int ws_posx[11] = {0,0,0,0,0,40, 17, 17, 22, 27, 15}; $   int ws_posy[4]  = {3, 21, 30, 45}; ***************  *** 170,176 ****     for(i=0;i<11;i++) 5       posx[i] = ONLYSHAPE ? ws_posx[i] : ns_posx[i];       for(i=0;i<5;i++): !     posx[i] += SHOWAMPM ? twfour_pos[i] : twelve_pos[i];        /* Open the display */.     if (!(dpy = XOpenDisplay(display_name)))   --- 166,172 ----     for(i=0;i<11;i++) 5       posx[i] = ONLYSHAPE ? ws_posx[i] : ns_posx[i];       for(i=0;i<5;i++)2 !     posx[i] += SHOWAMPM ? twfour[i] : twelve[i];        /* Open the display */.     if (!(dpy = XOpenDisplay(display_name)))  % *** usleep.c	Wed Jan 20 14:08:10 1999 * --- usleep.c.orig	Tue Mar 15 10:06:14 1994 *************** 
 *** 8,14 ****     */       #include <starlet.h> - #include <stdlib.h>    int usleep(usec)   	unsigned usec;    { 
 --- 8,13 ----  ***************  *** 30,35 ****   	/* 
   	 *	Done   	 */ ! 	return EXIT_SUCCESS;    }     --- 29,34 ----   	/* 
   	 *	Done   	 */
 ! 	return;   }     $! make asclock under OpenVMS  $!@ $! In case you want to override the automatic compiler detection< $! specify either DECC or GCC as a parameter, e.g. @make GCC $!E $! In case of problems with the build you might want to contact me at H $! zinser@decus.decus.de (preferred) or martin_zinser@exchange.de (Work) $!
 $ cflags = ""  $ vers = ""  $ x11check = 0
 $ true = 1 $ false = 0  $!! $! Check for advanced X11-logical  $!3 $ if f$search("X11:xpm.h").eqs."" then x11check = 1 5 $ if f$search("X11:shape.h").eqs."" then x11check = 1  $ if (x11check)  $ thenH $  write sys$output "Your X11-logical does not point to the directories"6 $  write sys$output "containing xpm.h and/or shape.h."; $  write sys$output "Please redefine X11 to include these." A $  write sys$output "An example how this might look like follows"  $  write sys$output "$!"P $  write sys$output "$! Get definitions for non-DECsupplied libs and missing rouG $  write sys$output "$! At the moment supported are: XMU, XAW, and XPM"  $  write sys$output "$!" $  write sys$output "$!"$ $  write sys$output "$ decwf = """""P $  write sys$output "$ if f$search(""sys$common:[000000]decw$include.dir"").nes. $  write sys$output "$  then" ; $  write sys$output "$    decwf = f$trnlnm(""sys$common"")" F $  write sys$output "$    decwf = decwf -""]"" + ""decw$include.],"" " $  write sys$output "$ endif" P $  write sys$output "$ define/nolog X11 'decwf'X11ADD,X11ADD:[XPM.LIB],DECW$INCL $  exit  $ endif  $! $! check for compiler  $!@ $ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "")< $ its_gnuc = .not.its_decc .and. (f$trnlnm("gnu_cc").nes."") $!  $! Exit if no compiler available $!% $ if (.not. (its_decc .or. its_gnuc))  $  then : $   write sys$output "C++ compiler required to build Xpdf" $   exit $  endif $!- $! Override if requested from the commandline  $! $ if (p1 .eqs. "DECC") $  then  $   its_decc = true  $   its_gnuc = false $ endif  $ if (p1 .eqs. "GCC")  $  then  $  its_decc = false  $  its_gnuc = true $ endif  $!
 $ if its_gnuc  $  then  $   COMP = "GCC" $   cflags = "/nocase" + cflags  $ endif 
 $ if its_decc  $  then  $   COMP = "CC" # $   cflags = "/prefix=all" + cflags ' $   set message/nofac/nosev/notext/noid 4 $   cc/lis=temp.txt/show=all/obj=temp.obj sys$input:- $   search temp.txt;-1 crtl_ver /out=temp.txt  $   open/read tfil temp.txt # $   read/end_of_file=CFIL tfil crtl 6 $   vers=f$extract(f$locate("CRTL_VER",crtl)+9,8,crtl) $CFIL: $   close tfil* $   delete temp.txt.,temp.txt;-1,temp.obj. $   set message/fac/sev/text/id  $ endif  $! $! Build the option file $! $ open/write optf asclock.opt  $ write optf "asclock.obj"E $ if (its_gnuc).or.(vers.lts."70000000") then write optf "usleep.obj" - $ write optf "Identification=""Asclock 1.0""" ! $ write optf "X11:libxpm.olb/lib" / $ write optf "SYS$SHARE:DECW$XLIBSHR.EXE/SHARE" 2 $ write optf "SYS$SHARE:DECW$XEXTLIBSHR.EXE/SHARE"? $ if (its_gnuc) then write optf "gnu_cc:[000000]gcclib.olb/lib" = $ if (its_gnuc) then write optf "sys$share:vaxcrtl.exe/share"  $ close optf $ 'comp 'cflags asclock.c D $ if (its_gnuc).or.(vers.lts."70000000") then 'comp 'cflags usleep.c $ link asclock.opt/opt $ exit  ( * Martin P.J. Zinser		           Email: * * KP II					          zinser@axp616.gsi.deO * Gesellschaft f. Schwerionenforschung GSI        zinser@decus.decus.de         K * Postfach 11 05 52                               martin_zinser@exchange.de 9 * D-64220 Darmstadt 		           Voice: 0049+6151/3592887 5 ================== RFC 822 Headers ================== ! Return-Path: zinser@axp602.gsi.de J Received: by sable.cenaath.cena.dgac.fr (UCX V4.1-12, OpenVMS V6.2 Alpha); 	Mon, 1 Feb 1999 10:51:01 +0100 < Received: from axp601.gsi.de (axp601.gsi.de [140.181.98.71])B 	by sid1.cenaath.cena.dgac.fr (8.8.8/8.8.8) with ESMTP id KAA08713A 	for <PMOREAU@CENA.DGAC.FR>; Mon, 1 Feb 1999 10:50:49 +0100 (MET)  From: zinser@axp602.gsi.deJ Received: by axp602.gsi.de (MX V5.0) id 3; Sun, 31 Jan 1999 18:48:21 +0200% Date: Sun, 31 Jan 1999 18:45:16 +0200  To: PMOREAU@CENA.DGAC.FR/ Message-ID: <009D30D2.4E7029EC.3@axp602.gsi.de>  Subject: ASclock 1.0