?? vms-changes
字號:
@(#)VMS-CHANGES 1.1 10/13/90From B1F5814@rigel.tamu.edu Thu May 31 15:14:35 1990Date: Thu, 31 May 1990 14:11:53 CDTFrom: B1F5814@RIGEL.TAMU.EDU (Brian Frost -- Academic Computing Services)Message-Id: <900531141153.2020197e@RIGEL.TAMU.EDU>Subject: xloadimage diffs and additions for VMSTo: jimfX-Vmsmail-To: SMTP%"jimf@saber.com"Jim,At the bottom of this messages is the diff file for the current release (1.05)of xloadimage. In addition to these changes, two new files are also needed forVMS use only. MAKE_VMS.COM compiles and links xloadimage. rindex.c is myversion of rindex for VMS. They are both listed below:Brian-README.VMS---------------------------------------------------------------------To compile XLOADIMAGE under VMS just use the MAKE_VMS.COM command procedureprovided.To use XLOADIMAGE you need to define a foreign command. Here is an example ofhow to do it. XLOADIMAGE :== $SYS$USERDISKB:[B1F5814.DECWINDOWS.XLOADIMAGE]XLOADIMAGEBrian Frost---------------------------------------------------------------------------------MAKE_VMS.COM-------------------------------------------------------------------$ define sys sys$library$ define X11 decw$include$ cc -BRIGHT, CLIP, COMPRESS, DITHER, FACES, FILL, GIF, HALFTONE, -IMAGETYPES, MERGE, MISC, NEW, OPTIONS, PATH, PBM, REDUCE, -RINDEX, ROOT, SEND, SUNRASTER, VALUE, WINDOW, XBITMAP, XLOADIMAGE, -XPIXMAP, ZIO, ZOOM $ link/nouserlibrary/exe=xloadimage -BRIGHT, CLIP, COMPRESS, DITHER, FACES, FILL, GIF, HALFTONE, -IMAGETYPES, MERGE, MISC, NEW, OPTIONS, PATH, PBM, REDUCE, -RINDEX, ROOT, SEND, SUNRASTER, VALUE, WINDOW, XBITMAP, XLOADIMAGE, -XPIXMAP, ZIO, ZOOM, sys$input/optsys$library:decw$xlibshr.exe/sharesys$library:vaxcrtl.exe/share---------------------------------------------------------------------------------rindex.c-----------------------------------------------------------------------#include stringchar *rindex (our_string, a_char) char our_string[], a_char; { int char_index, string_length; string_length = strlen(our_string); for (char_index = string_length; char_index >= 0 && our_string[char_index] != a_char; --char_index); if (char_index >= 0) return &our_string[char_index]; else return 0; }---------------------------------------------------------------------------------diff file----------------------------------------------------------------------diff -c v1.05/path.c vms/path.c*** v1.05/path.c Thu May 31 13:03:33 1990--- vms/path.c Thu May 31 11:53:27 1990****************** 12,18 ****--- 12,22 ---- #include "xloadimage.h" #include <X11/Xos.h> #include <sys/stat.h>+ #ifndef VMS /* Bef 5/31/89 */ #include <pwd.h>+ #else+ #define R_OK 4+ #endif /* Bef 5/31/89 */ #include <errno.h> extern int errno;****************** 100,105 ****--- 104,110 ---- } } + #ifndef VMS /* Bef 5/31/90 */ void loadPathsAndExts() { static int havepaths= 0; struct passwd *pw;****************** 122,128 **** readPathsAndExts(SYSPATHFILE); #endif }! /* find an image with paths and extensions from defaults files. returns * -1 if access denied or not found, 0 if ok. */--- 127,133 ---- readPathsAndExts(SYSPATHFILE); #endif }! #endif /* find an image with paths and extensions from defaults files. returns * -1 if access denied or not found, 0 if ok. */diff -c v1.05/xloadimage.c vms/xloadimage.c*** v1.05/xloadimage.c Thu May 31 13:03:37 1990--- vms/xloadimage.c Thu May 31 11:53:43 1990****************** 10,17 **** #include "copyright.h" #include "xloadimage.h" #include "patchlevel"! /* options array and definitions. note that the enum values must be in the * same order as the options strings. */--- 10,20 ---- #include "copyright.h" #include "xloadimage.h"+ #ifndef VMS /* Bef 5/31/90 */ #include "patchlevel"! #else /* Bef 5/31/90 */! #include "patchlevel." /* Bef 5/31/90 */! #endif /* Bef 5/31/90 */ /* options array and definitions. note that the enum values must be in the * same order as the options strings. */****************** 105,111 ****--- 108,116 ---- * our name was when invoked. */ + #ifndef VMS /* Bef 5/31/90 */ loadPathsAndExts();+ #endif /* Bef 5/31/90 */ onroot= 0; verbose= 1; if (!strcmp(tail(argv[0]), "xview")) {diff -c v1.05/zio.c vms/zio.c*** v1.05/zio.c Thu May 31 13:03:39 1990--- vms/zio.c Thu May 31 11:53:49 1990****************** 17,22 ****--- 17,23 ---- char buf[BUFSIZ]; zf= (ZFILE *)lmalloc((unsigned int)sizeof(ZFILE));+ #ifndef VMS /* Bef 5/31/90 */ if ((strlen(name) > 2) && !strcmp(".Z", name + (strlen(name) - 2))) { zf->type= ZPIPE; sprintf(buf, "uncompress -c %s", name);****************** 26,31 ****--- 27,33 ---- } return(zf); }+ #endif /* Bef 5/31/90 */ zf->type= ZSTANDARD; if (! (zf->stream= fopen(name, "r"))) { lfree((byte *)zf);****************** 66,74 ****--- 68,78 ---- case ZSTANDARD: fclose(zf->stream); break;+ #ifndef VMS /* Bef 5/31/90 */ case ZPIPE: pclose(zf->stream); break;+ #endif /* Bef 5/31/90 */ default: printf("zclose: bad ZFILE structure\n"); exit(1);--------------------------------------------------------------------------------
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -