From: ADA::WINS%"zinser@axp616.gsi.de" 25-MAY-1995 21:28:00.16 To: PMOREAU CC: Subj: Xscreensaver Return-Path: Received: from sid1.cenaath.cena.dgac.fr by ada with SMTP ; Thu, 25 May 95 21:27:54 MET Received: from axp616 (AXP616.gsi.de) by sid1.cenaath.cena.dgac.fr (4.1/SMI-4.1) id AA27330; Thu, 25 May 95 21:28:17 +0200 Date: Thu, 25 May 1995 21:31:14 +0200 Message-Id: <95052521311485@axp616.gsi.de> From: zinser@axp616.gsi.de To: PMOREAU@ada.cenaath.cena.dgac.fr Subject: Xscreensaver X-Vms-To: SMTP%"PMOREAU@ada.cenaath.cena.dgac.fr" Hello Patrick! Just looked at the Xscreensaver-program you ported to VMS. This one is really funny for running on a workstation and several of the graphics hacks are quite impressive. I noticed quite a number of informationals/warnings, when compiling with DEC C. I append a list of the changes to this mail, but since there is a number of these I've put also a zip-archive of the changed sources in the incoming directory of your server. Actually one problem remains with getpwnam.c. If you have an idea how to cure this I would be most interested to hear about it. I've noticed your define XPointer=char* in the DEC C and VAX C compile files. Actually this one is not related to the compiler but to the Xrelease. I would therefore suggest to put an #if Xlibspecificationrelease<5 (you'll have to look in xlib.h for the exact spelling) in the appropriate places. Then one could use one file for all compilers. Greetings, Martin -------------------------------------------------------------------------------- In compile_decc.com remove the definiton XPointer=char* from the compile directive for grabscreen.c (this definition prevents a successfull compile at least with Moftif 1.2). In the utils-subdir: grabscreen.c Add a #ifdef VMS # include #endif at the beginning of the file to get the function prototype for sleep. strings.c Add a #include at the beginning of the file to get various function prototypes right. In the driver subdirectory: Remove all the defines from the compile*.com files. VMS gets defined anyhow and the redefinition of the macros already defined in config.h produce nasty messages during compilation. demo.c add at line 539 void (*notice_events_timer_ptr)() = notice_events_timer; and change line 561 to XtAppAddTimeOut (app, notice_events_timeout, notice_events_timer_ptr, lock.c Change to #ifndef VMS #include #else #include "pwd.h" extern char *getenv(); extern int validate_user(char *name, char *password); extern void ungrab_keyboard_and_mouse P((void)); #endif to get the function prototypes for validate_user and ungrab_keyboard_and_mouse. subprocs.c #include "config.h" to pick up the no_setuid macro. In the ifndef VMS-part add #include /* to pickup close */ #include /* to pickup getpid */ remove there #include "resource.h" since this only causes troubles with undefined structures. visual.c #ifdef VMS #include /*to pick up strcmp*/ #endif windows.c #ifdef VMS #include /*to pick up getpid*/ #endif xscreensaver.c add #ifdef VMS #include /*for sleep*/ #include /*for getpid*/ #endif add void (*notice_events_timer_ptr)() = notice_events_timer; void (*activate_lock_timer_ptr)() = activate_lock_timer; at the beginning of the demo_mode function and change the subsequent XtAppAddTimeOut invocations to use the pointer instead of the function cycle_id = XtAppAddTimeOut (app, cycle, cycle_timer_ptr, 0); lock_id = XtAppAddTimeOut (app,lock_timeout, activate_lock_timer_ptr,0); chane the definition of now in timestring to const time_t now = time ((time_t *) 0); to keep the subseqent ctime happy. getpwnam.c #include #include #include make explicit casts to unsigned long in ItemList structure. hpwd.c Add #include #include to get the sys$... and strlen function prototypes. Change sys$getsyiw to lowercase. make VMS_VERSION a static char validate.c Add a #ifdef VMS #include #include "vmsutil.h" int hash_vms_password(char *output_buf,char *input_buf,int input_length, char *username,int encryption_type,unsigned short salt); #endif at the beginning of the file to get strlen, bcmp and hash_vms_password function prototypes right. In the hacks subdir: In compile_decc.com remove the definiton XPointer=char* from the compile directive for screenhacks.c (this definition prevents a successfull compile). screenhack.h add #include #include #include char *index(char *string, char *c); to the VMS specific part (it is needed e.g. for sin, sleep, getpid) Change '\n' to (char *)'\n' to stick to the function prototype. In noseguy.c #ifndef VMS'd the from_program case since this uses popen and pclose and if we ever enter there the program will bomb anyhow.