linux-decnet-commit Mailing List for DECnet for Linux (Page 22)
Brought to you by:
chrissie_c,
ph3-der-loewe
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(20) |
Feb
(27) |
Mar
(25) |
Apr
(12) |
May
(2) |
Jun
(6) |
Jul
(36) |
Aug
(12) |
Sep
(12) |
Oct
(16) |
Nov
(5) |
Dec
(5) |
2003 |
Jan
(8) |
Feb
(9) |
Mar
(25) |
Apr
(18) |
May
(29) |
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(10) |
Oct
(5) |
Nov
(3) |
Dec
(9) |
2004 |
Jan
(17) |
Feb
|
Mar
(9) |
Apr
|
May
(4) |
Jun
(1) |
Jul
(2) |
Aug
(21) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2005 |
Jan
(5) |
Feb
|
Mar
(13) |
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
(13) |
Oct
(83) |
Nov
(2) |
Dec
|
2006 |
Jan
(21) |
Feb
(1) |
Mar
(32) |
Apr
(31) |
May
(3) |
Jun
(1) |
Jul
|
Aug
(7) |
Sep
|
Oct
(1) |
Nov
(3) |
Dec
(13) |
2007 |
Jan
(1) |
Feb
(7) |
Mar
|
Apr
(2) |
May
|
Jun
(1) |
Jul
(2) |
Aug
(20) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
2008 |
Jan
(4) |
Feb
(13) |
Mar
(24) |
Apr
(18) |
May
(10) |
Jun
|
Jul
|
Aug
(40) |
Sep
(72) |
Oct
(61) |
Nov
(9) |
Dec
(2) |
2009 |
Jan
(6) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(41) |
Aug
(28) |
Sep
(2) |
Oct
(5) |
Nov
(4) |
Dec
|
2011 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Patrick C. <pa...@us...> - 2005-10-30 15:22:13
|
Update of /cvsroot/linux-decnet/dnprogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13797 Modified Files: NEWS Log Message: Update for Debian version Index: NEWS =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/NEWS,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** NEWS 5 Nov 2003 11:48:17 -0000 1.19 --- NEWS 30 Oct 2005 15:21:49 -0000 1.20 *************** *** 1,2 **** --- 1,85 ---- + dnprogs (2.32) unstable; urgency=low + + * fal removes [] from names as they could cause confusion. + * Fixed crash in libdap if a connection gets closed more than once. + * Fix libdnet's dnet_recv to cope with 0 being returned from recvmsg. + * Some minor manpage & packaging bugs fixed. + * Include dnlogin, a replacement for sethost. + * Include libvaxdata - a library of routines for converting between VAX. + data formats and Unix ones. Contributed by Larry Baker of the + US Geological Survey. + + -- Patrick Caulfield <pa...@de...> Sun, 30 Oct 2005 15:09:21 +0000 + + dnprogs (2.31) unstable; urgency=low + + * Add more RMS features to libdap. + * fix get_date as time_t in libdap. + * librms rms_open() now returns file info in the FAB. + * librms rms_read() returns EOF correctly + * librms rms_write() now works + * build mail with -fdollars-in-identifiers + Closes: #334138 + * Remove /etc/decnet.conf.old at Debian purge time. + Closes: #330362 + + -- Patrick Caulfield <pa...@de...> Mon, 17 Oct 2005 08:53:58 +0100 + + dnprogs (2.30.1) unstable; urgency=low + + * Add alternative dependancy on debconf-2.0 + + -- Patrick Caulfield <pa...@de...> Tue, 27 Sep 2005 08:20:46 +0100 + + dnprogs (2.30) unstable; urgency=low + + * Add -l option to dncopy. (ignore interlocks) + * Add more RMS features to librms & libdap + + -- Patrick Caulfield <pa...@de...> Fri, 2 Sep 2005 09:24:41 +0100 + + dnprogs (2.29.2) unstable; urgency=low + + * Add Czech debconf translation. + Closes: #315989 + + -- Patrick Caulfield <pa...@de...> Thu, 30 Jun 2005 14:30:27 +0100 + + dnprogs (2.29.1) unstable; urgency=low + + * Add Japanese debconf translation from Kenshi Muto. + Closes: #307049 + + -- Patrick Caulfield <pa...@de...> Mon, 2 May 2005 11:07:22 +0100 + + dnprogs (2.29) unstable; urgency=low + + * Add -p switch to dncopy, sets the protection of a file + uploaded to VMS. + + -- Patrick Caulfield <pa...@de...> Fri, 28 Jan 2005 15:32:03 +0000 + + dnprogs (2.28) unstable; urgency=low + + * Makefile fixups from Maciej W. Rozycki + * FAL now accepts VMS directories with "][" in them, eg those + produced by concatenated logicals. + + -- Patrick Caulfield <pa...@de...> Wed, 15 Dec 2004 10:50:44 +0000 + + dnprogs (2.27.1) unstable; urgency=low + + * Add Dutch debconf translation. Closes: #254842 + + -- Patrick Caulfield <pa...@de...> Fri, 9 Jul 2004 13:24:49 +0100 + + dnprogs (2.27) unstable; urgency=low + + * Fix signal handling in sethost so it doesn't die with an embarrassing + "Alarm clock" message. + * Add dependancy on modutils. Closes: #251508 + + -- Patrick Caulfield <pa...@de...> Sun, 30 May 2004 10:13:57 +0100 + dnprogs (2.26) unstable; urgency=low |
From: Patrick C. <pa...@us...> - 2005-10-30 15:22:13
|
Update of /cvsroot/linux-decnet/dnprogs/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13797/debian Modified Files: changelog libdnet-dev.files rules Removed Files: dnet-common.conffiles dnet-progs.conffiles Log Message: Update for Debian version Index: changelog =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/changelog,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** changelog 17 Oct 2005 08:41:09 -0000 1.34 --- changelog 30 Oct 2005 15:21:50 -0000 1.35 *************** *** 1,2 **** --- 1,15 ---- + dnprogs (2.32) unstable; urgency=low + + * fal removes [] from names as they could cause confusion. + * Fixed crash in libdap if a connection gets closed more than once. + * Fix libdnet's dnet_recv to cope with 0 being returned from recvmsg. + * Some minor manpage & packaging bugs fixed. + * Include dnlogin, a replacement for sethost. + * Include libvaxdata - a library of routines for converting between VAX. + data formats and Unix ones. Contributed by Larry Baker of the + US Geological Survey. + + -- Patrick Caulfield <pa...@de...> Sun, 30 Oct 2005 15:09:21 +0000 + dnprogs (2.31) unstable; urgency=low Index: libdnet-dev.files =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/libdnet-dev.files,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** libdnet-dev.files 4 Feb 2001 14:44:06 -0000 1.1 --- libdnet-dev.files 30 Oct 2005 15:21:51 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- ./usr/include/fabdef.h ./usr/include/rabdef.h + ./usr/include/convert_vax_data.h ./usr/lib/libdnet.a ./usr/lib/libdnet.so *************** *** 12,16 **** --- 13,19 ---- ./usr/lib/librms.a ./usr/lib/librms.so + ./usr/lib/libvaxdata.a ./usr/share/doc/libdnet-dev/librms.README + ./usr/share/doc/libdnet-dev/libvaxdata.pdf ./usr/share/man/man3/dnet_conn.3 ./usr/share/man/man3/dnet_htoa.3 Index: rules =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/debian/rules,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** rules 17 Oct 2005 08:41:09 -0000 1.19 --- rules 30 Oct 2005 15:21:51 -0000 1.20 *************** *** 74,77 **** --- 74,78 ---- cp Documentation/*README debian/tmp/usr/share/doc/dnet-progs cp Documentation/*README debian/tmp/usr/share/doc/libdnet-dev + cp libvaxdata/*pdf debian/tmp/usr/share/doc/libdnet-dev make install DESTDIR=`pwd`/debian/tmp MAKEDEB=true RELEASE=true mv debian/tmp/usr/man debian/tmp/usr/share --- dnet-common.conffiles DELETED --- --- dnet-progs.conffiles DELETED --- |
From: Patrick C. <pa...@us...> - 2005-10-30 15:14:43
|
Update of /cvsroot/linux-decnet/dnprogs/phone In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11720/phone Modified Files: phone.1 phoned.8 Log Message: Fix minor manpage bugs Index: phone.1 =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/phone/phone.1,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** phone.1 23 Jan 2001 11:48:24 -0000 1.2 --- phone.1 30 Oct 2005 15:14:35 -0000 1.3 *************** *** 25,29 **** will need to precede commands with the 'switch hook' character, which defaults to the percent sign (%). ! .br. You can also enter a command for phone on the shell command-line. This command will be executed when phone starts up. This makes it convenient to enter --- 25,29 ---- will need to precede commands with the 'switch hook' character, which defaults to the percent sign (%). ! .br You can also enter a command for phone on the shell command-line. This command will be executed when phone starts up. This makes it convenient to enter Index: phoned.8 =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/phone/phoned.8,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** phoned.8 23 Jan 2001 11:48:24 -0000 1.2 --- phoned.8 30 Oct 2005 15:14:35 -0000 1.3 *************** *** 1,3 **** ! .TH PHONED 1 "March 26 1999" "DECnet utilities" .SH NAME --- 1,3 ---- ! .TH PHONED 8 "March 26 1999" "DECnet utilities" .SH NAME |
From: Patrick C. <pa...@us...> - 2005-10-28 15:15:35
|
Update of /cvsroot/linux-decnet/dnprogs/Documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7311/Documentation Modified Files: dapfs.README Log Message: typos Index: dapfs.README =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/Documentation/dapfs.README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** dapfs.README 28 Oct 2005 08:02:05 -0000 1.1 --- dapfs.README 28 Oct 2005 15:15:21 -0000 1.2 *************** *** 20,24 **** dapfs requires libdnet, librms & libdap from the dnprogs package as well as, ! obviously, a DECnet-enabled and configured kernel. To mount a dapfs filesystem, make sure the fuse module is loaded into the kernel --- 20,25 ---- dapfs requires libdnet, librms & libdap from the dnprogs package as well as, ! obviously, a DECnet-enabled and configured kernel. Don't try to use dapfs ! to talk to another Linux box (though why would you want to?) as it won't work! To mount a dapfs filesystem, make sure the fuse module is loaded into the kernel |
From: Patrick C. <pa...@us...> - 2005-10-28 15:15:06
|
Update of /cvsroot/linux-decnet/dnprogs/dapfs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7176 Modified Files: Makefile dapfs.c dapfs_dap.cc Log Message: More stuff Index: Makefile =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dapfs/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile 12 Oct 2005 10:31:31 -0000 1.2 --- Makefile 28 Oct 2005 15:14:54 -0000 1.3 *************** *** 11,14 **** --- 11,16 ---- all: $(PROG1) + CFLAGS=-g + $(PROG1): $(PROG1OBJS) $(DEPLIBS) g++ -o$(PROG1) $(PROG1OBJS) -lrms -lfuse Index: dapfs.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dapfs/dapfs.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** dapfs.c 27 Oct 2005 09:18:41 -0000 1.9 --- dapfs.c 28 Oct 2005 15:14:54 -0000 1.10 *************** *** 35,40 **** #include "filenames.h" - /* Copied from dncopy */ - struct dapfs_handle { --- 35,38 ---- *************** *** 131,164 **** } ! static int dapfs_rmdir(const char *path) { ! char dirname[strlen(path)+7]; ! ! sprintf(dirname, "%s.DIR;1", path); ! return dap_delete_file(dirname); } ! ! static int dapfs_rename(const char *from, const char *to) { ! return dap_rename_file(from, to); } ! ! int dapfs_chmod(const char *path, mode_t mode) { - // Can we do this ?? return 0; } ! int dapfs_chown(const char *path, uid_t u, gid_t g) { ! // Can we do this ?? ! return 0; } ! static int dapfs_flush(const char *path, struct fuse_file_info *fi) { ! // NO-OP ! return 0; } --- 129,172 ---- } ! /* We can't do chown/chmod/utime but don't error as the user gets annoyed */ ! static int dapfs_chown(const char *path, uid_t u, gid_t g) { ! return 0; } ! static int dapfs_chmod(const char *path, mode_t m) { ! return 0; } ! static int dapfs_utime(const char *path, struct utimbuf *u) { return 0; } ! static int dapfs_rmdir(const char *path) { ! char dirname[strlen(path)+7]; ! char fullname[VMSNAME_LEN]; ! char vmsname[VMSNAME_LEN]; ! char reply[BUFLEN]; ! int len; ! ! /* Try the object first. if that fails then ! use DAP. This is because the VMS protection on ! directories can be problematic */ ! make_vms_filespec(path, vmsname, 0); ! ! sprintf(fullname, "REMOVE %s.DIR;1", vmsname); ! len = get_object_info(fullname, reply); ! if (len == 2) // "OK" ! return 0; ! ! sprintf(dirname, "%s.DIR;1", path); ! return dap_delete_file(dirname); } ! static int dapfs_rename(const char *from, const char *to) { ! return dap_rename_file(from, to); } *************** *** 210,224 **** return -EINVAL; - syslog(1, "dir = %s, vmsname: %s\n", path, vmsname); - *lastbracket = '.'; if (vmsname[strlen(vmsname)-1] == '.') vmsname[strlen(vmsname)-1] = '\0'; strcat(vmsname, "]"); - sprintf(fullname, "CREATE %s", vmsname); - len = get_object_info(fullname, reply); if (len != 2) // "OK" --- 218,230 ---- return -EINVAL; *lastbracket = '.'; + + /* make_vms_filespec() often leaves a trailing dot */ if (vmsname[strlen(vmsname)-1] == '.') vmsname[strlen(vmsname)-1] = '\0'; strcat(vmsname, "]"); sprintf(fullname, "CREATE %s", vmsname); len = get_object_info(fullname, reply); if (len != 2) // "OK" *************** *** 253,257 **** /* This gets called for normal files too... */ ! // TODO mode is ignored. static int dapfs_mknod(const char *path, mode_t mode, dev_t dev) { --- 259,263 ---- /* This gets called for normal files too... */ ! /* Note, mode is ignored */ static int dapfs_mknod(const char *path, mode_t mode, dev_t dev) { *************** *** 331,335 **** /* This can be quite slow, because it reads records. ! However, it's safer this way as we can make sense of sequential files. */ do { res = rms_read(h->rmsh, buf+got, size-got, &rab); --- 337,342 ---- /* This can be quite slow, because it reads records. ! However, it's safer this way as we can make sense of sequential files ! */ do { res = rms_read(h->rmsh, buf+got, size-got, &rab); *************** *** 434,441 **** .rename = dapfs_rename, .mknod = dapfs_mknod, - .chmod = dapfs_chmod, - .chown = dapfs_chown, .mkdir = dapfs_mkdir, ! .flush = dapfs_flush, .statfs = dapfs_statfs, .release = dapfs_release, --- 441,448 ---- .rename = dapfs_rename, .mknod = dapfs_mknod, .mkdir = dapfs_mkdir, ! .chown = dapfs_chown, ! .chmod = dapfs_chmod, ! .utime = dapfs_utime, .statfs = dapfs_statfs, .release = dapfs_release, Index: dapfs_dap.cc =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dapfs/dapfs_dap.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** dapfs_dap.cc 27 Oct 2005 08:50:21 -0000 1.6 --- dapfs_dap.cc 28 Oct 2005 15:14:54 -0000 1.7 *************** *** 40,44 **** } - // Use this for one-shot stuff like getattr & delete static dap_connection conn(0); --- 40,43 ---- *************** *** 224,228 **** { dap_status_message *sm = (dap_status_message *)m; ! if (sm->get_code() == 0x4030) { dap_contran_message cm; --- 223,227 ---- { dap_status_message *sm = (dap_status_message *)m; ! if (sm->get_code() == 0x4030) // Locked { dap_contran_message cm; *************** *** 236,240 **** else { ! ret = -ENOENT; // TODO better error // Clean connection status. dap_contran_message cm; --- 235,240 ---- else { ! ret = -ENOENT; // TODO better error ?? ! // Clean connection status. dap_contran_message cm; *************** *** 242,247 **** if (!cm.write(conn)) { restart_dap(); ! delete m; ! return -EIO; } } --- 242,246 ---- if (!cm.write(conn)) { restart_dap(); ! ret = -EIO; } } *************** *** 264,268 **** int ret; - // Use our own connection for this. ret = dap_connect(c); if (ret) --- 263,266 ---- *************** *** 424,427 **** --- 422,426 ---- { case dap_message::ACCOMP: + delete m; goto end; break; *************** *** 430,435 **** { dap_status_message *sm = (dap_status_message *)m; ! if (sm->get_code() & 1 != 1) ! ret = -EPERM; // Default error! goto end; } --- 429,434 ---- { dap_status_message *sm = (dap_status_message *)m; ! ret = -EPERM; // Default error! ! delete m; goto end; } *************** *** 438,441 **** --- 437,441 ---- delete m; } + end: return ret; *************** *** 496,499 **** int dap_init() { ! return dap_connect(conn); } --- 496,505 ---- int dap_init() { ! struct accessdata_dn accessdata; ! char node[BUFLEN], filespec[VMSNAME_LEN]; ! ! if (dap_connect(conn)) ! return -ENOTCONN; ! ! return 0; } |
From: Patrick C. <pa...@us...> - 2005-10-28 08:10:01
|
Update of /cvsroot/linux-decnet/dnprogs/libdap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32218 Modified Files: connection.cc Log Message: Don't double-free if the connection was already closed Index: connection.cc =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/libdap/connection.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** connection.cc 21 Oct 2001 14:24:00 -0000 1.6 --- connection.cc 28 Oct 2005 08:09:49 -0000 1.7 *************** *** 108,117 **** void dap_connection::close() { ! if (outbufptr && blocked) set_blocked(false); ! if (sockfd) ::close(sockfd); ! delete[] buf; ! delete[] outbuf; ! closed = true; } --- 108,120 ---- void dap_connection::close() { ! if (!closed) ! { ! if (outbufptr && blocked) set_blocked(false); ! if (sockfd) ::close(sockfd); ! delete[] buf; ! delete[] outbuf; ! closed = true; ! } } |
From: Patrick C. <pa...@us...> - 2005-10-28 08:02:12
|
Update of /cvsroot/linux-decnet/dnprogs/Documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30486/Documentation Added Files: dapfs.README Log Message: Doc on dapfs --- NEW FILE: dapfs.README --- dapfs is a filesystem for access VMS directories easily from Linux. It requires FUSE (Filesystems in USErspace) http://fuse.sf.net which is both a userland library and a kernel component. The kernel component is available in Linux 2.6.14 onwards and patches are available for earlier kernels from the above web site. To build dapfs you will need the development library package for FUSE 2.2 or higher. To enable all the features of daps you will also need to install the DAPFS.COM DECnet object on the remote VMS host - see the start of that command-procedure for installation details. Without this, you will still be able to do most things with dapfs but the following will not work: - statfs (including the 'df' command) - mkdir - rmdir (if the protection of the VMS directory does not have Delete set) Other things that do not work are chmod and chown as these do not map neatly onto Unix principles. dapfs requires libdnet, librms & libdap from the dnprogs package as well as, obviously, a DECnet-enabled and configured kernel. To mount a dapfs filesystem, make sure the fuse module is loaded into the kernel and use the followng syntax: mount -tfuse dapfs#filespec <mountpoint> Here are some examples: mount -tfuse dapfs#zarqon:: /mnt/vax this will use the default DECnet account on 'zarqon' or a proxy for "ROOT" mount -tfuse dapfs#'ford"patrick password"::' /mnt/alpha this will use the specified user account. NOTE that the password will be shown in the output of the 'df' command! Also note the use of quotes here, the single quotes are needed to protect the double quotes from the shell. |
From: Patrick C. <pa...@us...> - 2005-10-27 13:31:25
|
Update of /cvsroot/linux-decnet/dnprogs/dnlogin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25268 Modified Files: cterm.c tty.c Log Message: Dodgy "fix" to make TPU work better Index: cterm.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnlogin/cterm.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** cterm.c 27 Oct 2005 10:07:45 -0000 1.20 --- cterm.c 27 Oct 2005 13:31:13 -0000 1.21 *************** *** 199,203 **** if (flags & 4) tty_clear_typeahead(); if (flags & 0x800) tty_set_noecho(); ! if (flags & 0x8 && buf[ptr+1] != '\n') tty_format_cr(); --- 199,205 ---- if (flags & 4) tty_clear_typeahead(); if (flags & 0x800) tty_set_noecho(); ! ! // PJC: The inclusion of the prompt len in here fixes TPU but is is right??? ! if (flags & 0x8 && buf[ptr+1] != '\n' && eoprompt > 0) tty_format_cr(); *************** *** 261,270 **** char prefixdata = buf[3]; char postfixdata = buf[4]; ! char feed; // TODO: flags... // TSQQ PPEB DLUU // UU lock handling "Page 65" ! // L 1=Output LF at end and set a flag to skip next LF i nnext write // D 1=Set output discard state to "do not discard" // B 1=This is the beginning of a host data message --- 263,272 ---- char prefixdata = buf[3]; char postfixdata = buf[4]; ! char feed = '\n'; // TODO: flags... // TSQQ PPEB DLUU // UU lock handling "Page 65" ! // L 1=Output LF at end and set a flag to skip next LF in next write // D 1=Set output discard state to "do not discard" // B 1=This is the beginning of a host data message *************** *** 283,286 **** --- 285,291 ---- tty_write(buf+4, len-4); + if ((flags >>2)&1) + tty_write(&feed, 1); + send_prepostfix(((flags >> 8) & 3), postfixdata); //QQ return len; Index: tty.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnlogin/tty.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** tty.c 27 Oct 2005 08:18:01 -0000 1.19 --- tty.c 27 Oct 2005 13:31:13 -0000 1.20 *************** *** 115,118 **** --- 115,120 ---- char lf = '\n'; + if (debug & 4) + fprintf(stderr, "TTY: format_cr, last char was %x\n", last_char); if (last_char == '\r') write(termfd, &lf, 1); *************** *** 269,272 **** --- 271,275 ---- new_term.c_iflag &= ~BRKINT; + new_term.c_iflag &= ~INLCR; new_term.c_iflag |= IGNBRK; new_term.c_oflag &= ~ONLCR; |
From: Patrick C. <pa...@us...> - 2005-10-27 12:31:34
|
Update of /cvsroot/linux-decnet/dnprogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12966 Modified Files: Makefile Makefile.common rpm.spec Log Message: Build libvaxdata and put it into the RPM Index: Makefile =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/Makefile,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** Makefile 24 Oct 2005 08:32:52 -0000 1.25 --- Makefile 27 Oct 2005 12:31:26 -0000 1.26 *************** *** 10,14 **** SUBDIRS=include libdnet libdaemon libdap librms fal dndir dnsubmit dndel \ ! dncopy apps dntask dnlogin mail phone dnetd dnroute scripts all: --- 10,14 ---- SUBDIRS=include libdnet libdaemon libdap librms fal dndir dnsubmit dndel \ ! dncopy apps dntask dnlogin mail phone dnetd libvaxdata dnroute scripts all: *************** *** 84,87 **** --- 84,88 ---- mkdir -p BUILD RPMS/$(ARCH) cp README NEWS Documentation/*.README BUILD + cp libvaxdata/libvaxdata.pdf BUILD rpmbuild -bb --target $(ARCH) --buildroot `pwd`/rpmbuild -v --rcfile .rpmrc $(PKGNAME).spec rm -f $(PKGNAME).spec .rpmrc .rpmmacros Index: Makefile.common =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/Makefile.common,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** Makefile.common 17 Oct 2005 07:53:14 -0000 1.31 --- Makefile.common 27 Oct 2005 12:31:26 -0000 1.32 *************** *** 58,62 **** MAJOR_VERSION=2 ! MINOR_VERSION=31 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) --- 58,62 ---- MAJOR_VERSION=2 ! MINOR_VERSION=32 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION) Index: rpm.spec =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/rpm.spec,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** rpm.spec 21 Oct 2005 14:43:25 -0000 1.9 --- rpm.spec 27 Oct 2005 12:31:26 -0000 1.10 *************** *** 15,21 **** remote execution of commands. ! To use them you will need to have DECnet built into your kernel. ! See http://linux-decnet.sourceforge.net to get the kernel patch and ! instructions on how to apply it. %files --- 15,19 ---- remote execution of commands. ! To use them you will need to have DECnet built into your kernel or as a module. %files *************** *** 103,106 **** --- 101,105 ---- %%LIBPREFIX%%/lib/librms.so.%%MAJOR_VERSION%% %%LIBPREFIX%%/lib/librms.so.%%VERSION%% + %%LIBPREFIX%%/lib/libvaxdata.a /usr/include/netdnet/dnetdb.h /usr/include/netdnet/dn.h *************** *** 108,111 **** --- 107,111 ---- /usr/include/rabdef.h /usr/include/fabdef.h + /usr/include/convert_vax_data.h %config %%CONFPREFIX%%/etc/decnet.conf.sample *************** *** 114,118 **** %dir /usr/include/netdnet ! %doc README NEWS fal.README mail.README dnetd.README phone.README librms.README %post --- 114,118 ---- %dir /usr/include/netdnet ! %doc README NEWS fal.README mail.README dnetd.README phone.README librms.README libvaxdata.pdf %post |
From: Patrick C. <pa...@us...> - 2005-10-27 12:31:15
|
Update of /cvsroot/linux-decnet/dnprogs/libvaxdata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12909/libvaxdata Modified Files: Makefile Log Message: "ALL" -> "all" Index: Makefile =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/libvaxdata/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile 25 Oct 2005 07:32:13 -0000 1.1 --- Makefile 27 Oct 2005 12:31:07 -0000 1.2 *************** *** 3,7 **** ARCH=$(shell uname -m) ! ALL: cd linux; make -f makefile.gcc --- 3,7 ---- ARCH=$(shell uname -m) ! all: cd linux; make -f makefile.gcc |
From: Patrick C. <pa...@us...> - 2005-10-27 10:08:03
|
Update of /cvsroot/linux-decnet/dnprogs/dnlogin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14101 Modified Files: cterm.c found.c Log Message: Make debug levels more consistent Index: cterm.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnlogin/cterm.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** cterm.c 27 Oct 2005 08:18:01 -0000 1.19 --- cterm.c 27 Oct 2005 10:07:45 -0000 1.20 *************** *** 309,313 **** if (debug & 2) ! fprintf(stderr, "CTERM: selector = %d\n", selector); if ((selector & 0x200) == 0) /* Physical characteristics */ --- 309,313 ---- if (debug & 2) ! fprintf(stderr, "CTERM: selector = 0x%x\n", selector); if ((selector & 0x200) == 0) /* Physical characteristics */ Index: found.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnlogin/found.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** found.c 27 Oct 2005 08:18:01 -0000 1.15 --- found.c 27 Oct 2005 10:07:45 -0000 1.16 *************** *** 127,131 **** struct common_header header; ! if (debug) fprintf(stderr, "FOUND: sending %d bytes\n", len); if (debug & 8) { --- 127,131 ---- struct common_header header; ! if (debug & 1) fprintf(stderr, "FOUND: sending %d bytes\n", len); if (debug & 8) { *************** *** 197,207 **** { case FOUND_MSG_BIND: ! if (debug) ! printf("connected to %s host\n", hosttype[inbuf[4]-1]); return send_bindaccept(); case FOUND_MSG_UNBIND: ! if (debug) ! printf("Unbind from host. reason = %d\n", inbuf[1]); return -1; --- 197,207 ---- { case FOUND_MSG_BIND: ! if (debug & 1) ! fprintf(stderr, "FOUND: connected to %s host\n", hosttype[inbuf[4]-1]); return send_bindaccept(); case FOUND_MSG_UNBIND: ! if (debug & 1) ! fprintf(stderr, "FOUND: Unbind from host. reason = %d\n", inbuf[1]); return -1; *************** *** 223,227 **** int msglen = inbuf[ptr] | inbuf[ptr+1]<<8; ! if (debug) fprintf(stderr, "FOUND: commondata: %d bytes\n",msglen); --- 223,227 ---- int msglen = inbuf[ptr] | inbuf[ptr+1]<<8; ! if (debug&1) fprintf(stderr, "FOUND: commondata: %d bytes\n",msglen); |
From: Patrick C. <pa...@us...> - 2005-10-27 09:18:51
|
Update of /cvsroot/linux-decnet/dnprogs/dapfs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5303 Modified Files: dapfs.c Log Message: mkdir now works (with DECnet object) Index: dapfs.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dapfs/dapfs.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** dapfs.c 27 Oct 2005 08:50:21 -0000 1.8 --- dapfs.c 27 Oct 2005 09:18:41 -0000 1.9 *************** *** 201,209 **** char reply[BUFLEN]; int len; make_vms_filespec(path, vmsname, 0); ! sprintf(fullname, "MKDIR %s", vmsname); ! len = get_object_info("STATFS", reply); if (len != 2) // "OK" return -errno; --- 201,225 ---- char reply[BUFLEN]; int len; + char *lastbracket; make_vms_filespec(path, vmsname, 0); ! // Ths gives is a name like '[]pjc' which we ! // need to turn into [.pjc] ! lastbracket = strchr(vmsname, ']'); ! if (!lastbracket) ! return -EINVAL; ! syslog(1, "dir = %s, vmsname: %s\n", path, vmsname); ! ! *lastbracket = '.'; ! if (vmsname[strlen(vmsname)-1] == '.') ! vmsname[strlen(vmsname)-1] = '\0'; ! strcat(vmsname, "]"); ! ! ! sprintf(fullname, "CREATE %s", vmsname); ! ! ! len = get_object_info(fullname, reply); if (len != 2) // "OK" return -errno; |
From: Patrick C. <pa...@us...> - 2005-10-27 08:50:29
|
Update of /cvsroot/linux-decnet/dnprogs/dapfs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31841 Modified Files: dapfs.c dapfs.com dapfs_dap.cc dapfs_dap.h Log Message: Some bugfixes & error detection. "df" now works too (if you install the object). Index: dapfs.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dapfs/dapfs.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** dapfs.c 18 Oct 2005 07:29:18 -0000 1.7 --- dapfs.c 27 Oct 2005 08:50:21 -0000 1.8 *************** *** 31,34 **** --- 31,35 ---- #include <netdnet/dn.h> #include "rms.h" + #include "dapfs.h" #include "dapfs_dap.h" #include "filenames.h" *************** *** 49,53 **** }; ! char prefix[1024]; static const int RAT_DEFAULT = -1; // Use RMS defaults --- 50,54 ---- }; ! char prefix[BUFLEN]; static const int RAT_DEFAULT = -1; // Use RMS defaults *************** *** 66,70 **** static const int RFM_STMCR = 6; - /* Convert RMS record carriage control into something more unixy */ static int convert_rms_record(char *buf, int len, struct dapfs_handle *fh) --- 67,70 ---- *************** *** 169,174 **** int res; struct RAB rab; ! char fullname[2048]; ! char vmsname[2048]; make_vms_filespec(path, vmsname, 0); --- 169,174 ---- int res; struct RAB rab; ! char fullname[VMSNAME_LEN]; ! char vmsname[VMSNAME_LEN]; make_vms_filespec(path, vmsname, 0); *************** *** 197,210 **** static int dapfs_mkdir(const char *path, mode_t mode) { ! syslog(LOG_DEBUG, "PJC: dapfs_mkdir called for %s\n", path); ! // TODO Use remote object ! return -ENOSYS; } static int dapfs_statfs(const char *path, struct statfs *stbuf) { ! syslog(LOG_DEBUG, "PJC: dapfs_statfs called for %s\n", path); ! // TODO Use remote object ! return -ENOSYS; } --- 197,236 ---- static int dapfs_mkdir(const char *path, mode_t mode) { ! char fullname[VMSNAME_LEN]; ! char vmsname[VMSNAME_LEN]; ! char reply[BUFLEN]; ! int len; ! ! make_vms_filespec(path, vmsname, 0); ! sprintf(fullname, "MKDIR %s", vmsname); ! ! len = get_object_info("STATFS", reply); ! if (len != 2) // "OK" ! return -errno; ! else ! return 0; } static int dapfs_statfs(const char *path, struct statfs *stbuf) { ! int len; ! char reply[BUFLEN]; ! long size, free; ! ! len = get_object_info("STATFS", reply); ! if (len <= 0) ! return -errno; ! ! memset(stbuf, 0, sizeof(*stbuf)); ! ! if (sscanf(reply, "%ld, %ld", &free, &size) != 2) ! return -EINVAL; ! ! stbuf->f_bsize = 512; ! stbuf->f_blocks = size; ! stbuf->f_bfree = free; ! stbuf->f_bavail = free; ! ! return 0; } *************** *** 215,220 **** { RMSHANDLE rmsh; ! char fullname[2048]; ! char vmsname[2048]; if (!S_ISREG(mode)) --- 241,246 ---- { RMSHANDLE rmsh; ! char fullname[VMSNAME_LEN]; ! char vmsname[VMSNAME_LEN]; if (!S_ISREG(mode)) *************** *** 235,240 **** struct dapfs_handle *h; struct FAB fab; ! char fullname[2048]; ! char vmsname[2048]; syslog(LOG_DEBUG, "open %s, flags=%x\n", path, fi->flags); --- 261,266 ---- struct dapfs_handle *h; struct FAB fab; ! char fullname[VMSNAME_LEN]; ! char vmsname[VMSNAME_LEN]; syslog(LOG_DEBUG, "open %s, flags=%x\n", path, fi->flags); *************** *** 373,377 **** /* If this failed and there's no file type, see if it is a directory */ if (res == -ENOENT && strchr(path, '.')==NULL) { ! char dirname[1024]; sprintf(dirname, "%s.dir", path); res = dapfs_getattr_dap(dirname, stbuf); --- 399,403 ---- /* If this failed and there's no file type, see if it is a directory */ if (res == -ENOENT && strchr(path, '.')==NULL) { ! char dirname[BUFLEN]; sprintf(dirname, "%s.dir", path); res = dapfs_getattr_dap(dirname, stbuf); Index: dapfs.com =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dapfs/dapfs.com,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** dapfs.com 22 Oct 2005 11:02:32 -0000 1.2 --- dapfs.com 27 Oct 2005 08:50:21 -0000 1.3 *************** *** 60,66 **** $statfs_op: $! ! $ freeK=f$getdvi("sys$disk", "FREEBLOCKS")/2 ! $ maxK=f$getdvi("sys$disk", "MAXBLOCK")/2 ! $ write dapfs "''freeK', ''maxk'" $ goto out $! --- 60,66 ---- $statfs_op: $! ! $ free=f$getdvi("sys$disk", "FREEBLOCKS") ! $ max=f$getdvi("sys$disk", "MAXBLOCK") ! $ write dapfs "''free', ''max'" $ goto out $! Index: dapfs_dap.cc =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dapfs/dapfs_dap.cc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** dapfs_dap.cc 13 Oct 2005 11:47:39 -0000 1.5 --- dapfs_dap.cc 27 Oct 2005 08:50:21 -0000 1.6 *************** *** 27,31 **** --- 27,35 ---- #include <errno.h> #include <sys/statfs.h> + #include <sys/select.h> + #include <sys/socket.h> #include <netdnet/dn.h> + #include <netdnet/dnetdb.h> + #include "dn_endian.h" #include "connection.h" #include "protocol.h" *************** *** 33,36 **** --- 37,41 ---- extern "C" { #include "filenames.h" + #include "dapfs.h" } *************** *** 55,58 **** --- 60,143 ---- } + static void restart_dap() + { + syslog(LOG_INFO, "Restarting dapfs connection\n"); + conn.close(); + dap_connect(conn); + } + + int get_object_info(char *command, char *reply) + { + dap_connection dummy(0); // So we can use parse() + struct accessdata_dn accessdata; + char node[BUFLEN], filespec[VMSNAME_LEN]; + int sockfd; + int status; + struct nodeent *np; + struct sockaddr_dn sockaddr; + fd_set fds; + struct timeval tv; + + memset(&accessdata, 0, sizeof(accessdata)); + + /* This should always succeed, otherwise we would never get here */ + if (!dummy.parse(prefix, accessdata, node, filespec)) + return -1; + + memcpy(accessdata.acc_acc, accessdata.acc_user, accessdata.acc_userl); + accessdata.acc_accl =accessdata.acc_userl; + + np = getnodebyname(node); + + if ((sockfd=socket(AF_DECnet, SOCK_SEQPACKET, DNPROTO_NSP)) == -1) + { + return -1; + } + + // Provide access control and proxy information + if (setsockopt(sockfd, DNPROTO_NSP, SO_CONACCESS, &accessdata, + sizeof(accessdata)) < 0) + { + return -1; + } + + /* Open up object number 0 with the name of the task */ + sockaddr.sdn_family = AF_DECnet; + sockaddr.sdn_flags = 0x00; + sockaddr.sdn_objnum = 0x00; + memcpy(sockaddr.sdn_objname, "dapfs", 5); + sockaddr.sdn_objnamel = dn_htons(5); + memcpy(sockaddr.sdn_add.a_addr, np->n_addr,2); + sockaddr.sdn_add.a_len = 2; + + if (connect(sockfd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) + { + close(sockfd); + return -1; + } + + // Now run the command + if (write(sockfd, command, strlen(command)) < (int)strlen(command)) + { + close(sockfd); + return -1; + } + + // Wait for completion (not for ever!!) + FD_ZERO(&fds); + FD_SET(sockfd, &fds); + tv.tv_usec = 0; + tv.tv_sec = 3; + status = select(sockfd+1, &fds, NULL, NULL, &tv); + if (status <= 0) + { + close(sockfd); + return -1; + } + status = read(sockfd, reply, BUFLEN); + close (sockfd); + return status; + } + static void add_to_stat(dap_message *m, struct stat *stbuf) { *************** *** 106,110 **** int dapfs_getattr_dap(const char *path, struct stat *stbuf) { ! char vmsname[1024]; char name[80]; int ret = 0; --- 191,195 ---- int dapfs_getattr_dap(const char *path, struct stat *stbuf) { ! char vmsname[VMSNAME_LEN]; char name[80]; int ret = 0; *************** *** 120,124 **** dap_access_message::DISPLAY_DATE_MASK | dap_access_message::DISPLAY_PROT_MASK); ! acc.write(conn); dap_message *m; --- 205,212 ---- dap_access_message::DISPLAY_DATE_MASK | dap_access_message::DISPLAY_PROT_MASK); ! if (!acc.write(conn)) { ! restart_dap(); ! return -EIO; ! } dap_message *m; *************** *** 140,144 **** dap_contran_message cm; cm.set_confunc(dap_contran_message::SKIP); ! cm.write(conn); } else --- 228,236 ---- dap_contran_message cm; cm.set_confunc(dap_contran_message::SKIP); ! if (!cm.write(conn)) { ! restart_dap(); ! delete m; ! return -EIO; ! } } else *************** *** 148,152 **** dap_contran_message cm; cm.set_confunc(dap_contran_message::SKIP); ! cm.write(conn); } } --- 240,248 ---- dap_contran_message cm; cm.set_confunc(dap_contran_message::SKIP); ! if (!cm.write(conn)) { ! restart_dap(); ! delete m; ! return -EIO; ! } } } *************** *** 161,165 **** { dap_connection c(0); ! char vmsname[1024]; char wildname[strlen(path)+2]; char name[80]; --- 257,261 ---- { dap_connection c(0); ! char vmsname[VMSNAME_LEN]; char wildname[strlen(path)+2]; char name[80]; *************** *** 195,199 **** dap_access_message::DISPLAY_DATE_MASK | dap_access_message::DISPLAY_PROT_MASK); ! acc.write(c); bool name_pending = false; --- 291,298 ---- dap_access_message::DISPLAY_DATE_MASK | dap_access_message::DISPLAY_PROT_MASK); ! if (!acc.write(c)) { ! c.close(); ! return -EIO; ! } bool name_pending = false; *************** *** 213,217 **** if (name_pending) { ! char unixname[1024]; make_unix_filespec(unixname, name); --- 312,316 ---- if (name_pending) { ! char unixname[BUFLEN]; make_unix_filespec(unixname, name); *************** *** 284,288 **** if (name_pending) { ! char unixname[1024]; make_unix_filespec(unixname, name); if (strstr(unixname, ".dir") == unixname+strlen(unixname)-4) --- 383,387 ---- if (name_pending) { ! char unixname[BUFLEN]; make_unix_filespec(unixname, name); if (strstr(unixname, ".dir") == unixname+strlen(unixname)-4) *************** *** 300,304 **** int dap_delete_file(const char *path) { ! char vmsname[1024]; char name[80]; int ret; --- 399,403 ---- int dap_delete_file(const char *path) { ! char vmsname[VMSNAME_LEN]; char name[80]; int ret; *************** *** 312,316 **** acc.set_filespec(vmsname); acc.set_display(0); ! acc.write(conn); // Wait for ACK or status --- 411,418 ---- acc.set_filespec(vmsname); acc.set_display(0); ! if (!acc.write(conn)) { ! restart_dap(); ! return -EIO; ! } // Wait for ACK or status *************** *** 342,347 **** int dap_rename_file(const char *from, const char *to) { ! char vmsfrom[1024]; ! char vmsto[1024]; int ret; int size; --- 444,449 ---- int dap_rename_file(const char *from, const char *to) { ! char vmsfrom[VMSNAME_LEN]; ! char vmsto[VMSNAME_LEN]; int ret; int size; *************** *** 355,359 **** acc.set_filespec(vmsfrom); acc.set_display(0); ! acc.write(conn); // TODO Test this, We may need to split the filespec up into DIR & FILE messages, --- 457,465 ---- acc.set_filespec(vmsfrom); acc.set_display(0); ! if (!acc.write(conn)) { ! restart_dap(); ! return -EIO; ! } ! // TODO Test this, We may need to split the filespec up into DIR & FILE messages, *************** *** 362,366 **** nam.set_nametype(dap_name_message::FILESPEC); nam.set_namespec(vmsto); ! nam.write(conn); // Wait for ACK or status --- 468,475 ---- nam.set_nametype(dap_name_message::FILESPEC); nam.set_namespec(vmsto); ! if (!nam.write(conn)) { ! restart_dap(); ! return -EIO; ! } // Wait for ACK or status Index: dapfs_dap.h =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dapfs/dapfs_dap.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** dapfs_dap.h 13 Oct 2005 09:50:23 -0000 1.3 --- dapfs_dap.h 27 Oct 2005 08:50:21 -0000 1.4 *************** *** 9,12 **** --- 9,13 ---- int dap_delete_file(const char *path); int dap_rename_file(const char *from, const char *to); + int get_object_info(char *command, char *reply); int dap_init(void); |
From: Patrick C. <pa...@us...> - 2005-10-27 08:24:11
|
Update of /cvsroot/linux-decnet/dnprogs/dntask In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27636 Modified Files: dntask.c Log Message: Cope with EOF from DECnet Index: dntask.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dntask/dntask.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** dntask.c 14 Mar 2002 16:19:46 -0000 1.6 --- dntask.c 27 Oct 2005 08:24:03 -0000 1.7 *************** *** 85,88 **** --- 85,92 ---- return; } + if (len == 0) /* EOF */ + { + return; + } if (binary_mode) |
From: Patrick C. <pa...@us...> - 2005-10-27 08:18:09
|
Update of /cvsroot/linux-decnet/dnprogs/dnlogin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26207 Modified Files: README cterm.c dnlogin.h found.c tty.c Log Message: Some tidying. Index: README =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnlogin/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** README 22 Oct 2005 13:53:46 -0000 1.2 --- README 27 Oct 2005 08:18:01 -0000 1.3 *************** *** 1,5 **** This is a replacement for the rather unwieldy sethost program. It is pretty much in a usable state now (though only tested to VMS), any additions/fixes/bug ! reports are welcom. The principle is that found.c implements the foundation protocol in found.txt --- 1,5 ---- This is a replacement for the rather unwieldy sethost program. It is pretty much in a usable state now (though only tested to VMS), any additions/fixes/bug ! reports are welcome. The principle is that found.c implements the foundation protocol in found.txt Index: cterm.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnlogin/cterm.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** cterm.c 22 Oct 2005 10:59:02 -0000 1.18 --- cterm.c 27 Oct 2005 08:18:01 -0000 1.19 *************** *** 703,709 **** { if (oobchar == CTRL_C || oobchar == CTRL_Y) ! tty_write("\n*Interrupt*\n", 13); ! if (oobchar == CTRL_O) ! tty_write("\n*Output On/Off*\n", 16); } return ret; --- 703,714 ---- { if (oobchar == CTRL_C || oobchar == CTRL_Y) ! tty_write("\033[7mInterrupt\033[0m\n", 18); ! if (oobchar == CTRL_O) ! { ! if (tty_discard()) ! tty_write("\n\033[7mOutput Off\033[0m\n", 20); ! else ! tty_write("\n\033[7mOutput On\033[0m\n", 19); ! } } return ret; Index: dnlogin.h =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnlogin/dnlogin.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** dnlogin.h 22 Oct 2005 10:08:41 -0000 1.16 --- dnlogin.h 27 Oct 2005 08:18:01 -0000 1.17 *************** *** 49,52 **** --- 49,53 ---- extern void tty_format_cr(void); extern int tty_get_input_count(void); + extern int tty_discard(void); extern int (*send_input)(char *buf, int len, int term_pos, int flags); Index: found.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnlogin/found.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** found.c 22 Oct 2005 14:34:17 -0000 1.14 --- found.c 27 Oct 2005 08:18:01 -0000 1.15 *************** *** 171,175 **** return 0; /* Remote end shut down */ ! if (len == -1 && errno == EPIPE) return -1; --- 171,177 ---- return 0; /* Remote end shut down */ ! if (len == 0) ! return -1; ! if (len == -1 && errno == EPIPE) /* Old kernel bug */ return -1; Index: tty.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/dnlogin/tty.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** tty.c 24 Oct 2005 09:14:00 -0000 1.18 --- tty.c 27 Oct 2005 08:18:01 -0000 1.19 *************** *** 106,109 **** --- 106,114 ---- } + int tty_discard() + { + return discard; + } + void tty_format_cr() { *************** *** 461,465 **** reading = 0; case CTRL_O: - // TODO echo "output on/off" discard = ~discard; break; --- 466,469 ---- |
From: Patrick C. <pa...@us...> - 2005-10-26 16:13:04
|
Update of /cvsroot/linux-decnet/dnprogs/libdnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26187 Modified Files: dnet_recv.c Log Message: Cope with EOF (0) returned from recvmsg. The current kernels don't ever do this (!) but I have a fix in the works. Index: dnet_recv.c =================================================================== RCS file: /cvsroot/linux-decnet/dnprogs/libdnet/dnet_recv.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** dnet_recv.c 27 Oct 2000 16:11:56 -0000 1.2 --- dnet_recv.c 26 Oct 2005 16:12:51 -0000 1.3 *************** *** 67,71 **** iov.iov_base += status; } ! while (status >= 0 && !(msg.msg_flags & MSG_EOR)); if (status > 0) status = offset; /* Return size read */ --- 67,71 ---- iov.iov_base += status; } ! while (status > 0 && !(msg.msg_flags & MSG_EOR)); if (status > 0) status = offset; /* Return size read */ |
From: Patrick C. <pa...@us...> - 2005-10-25 07:32:25
|
Update of /cvsroot/linux-decnet/dnprogs/libvaxdata/vms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7174/vms Added Files: make.com readme Log Message: Add in libvaxdata --- NEW FILE: make.com --- $ verify = 'F$Verify( 0 )' $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $! ! $! Make.com - Make library of functions for reading and writing VAX format ! $! data for OpenVMS using DEC/Compaq/HP VAX C or DEC C (CC). ! $! ! $! DCL command syntax: @Make [ all | libvaxdata | clean ] ! $! ! $! ! $! Author: Lawrence M. Baker ! $! U.S. Geological Survey ! $! 345 Middlefield Road MS977 ! $! Menlo Park, CA 94025 ! $! ba...@us... ! $! ! $! Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- ! $! sion Routines, US Geological Survey, Open-File Report no. ! $! 2005-XXX, nn p. ! $! ! $! ! $! Disclaimer ! $! ! $! Although this program has been used by the USGS, no warranty, expressed or ! $! implied, is made by the USGS or the United States Government as to the ! $! accuracy and functioning of the program and related program material, nor ! $! shall the fact of distribution constitute any such warranty, and no ! $! responsibility is assumed by the USGS in connection therewith. ! $! ! $! ! $! Modification History: ! $! ! $! 12-Oct-2005 L. M. Baker Original version (from make.libvfbb). ! $! ! $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $! $ lib_name = "LibVAXData" $ args = "||all|libvaxdata|clean|" $ P1 = F$Edit( P1, "TRIM,LOWERCASE" ) $ If ( F$Locate( "|''P1'|", args ) .eq. F$Length( args ) ) $ Then $ Write Sys$Error - "DCL command syntax: @Make [ all | libvaxdata | clean ]" $ Goto EXIT $ EndIf $! $ arch = F$GetSYI( "ARCH_NAME" ) $! $ If ( F$Search( "'arch'.DIR;1" ) .eqs. "" ) $ Then $ Set Verify $ Create /Directory [.'arch'] $ junk = 'F$Verify( 0 )' $ EndIf $! $ cflags = "" $! $ Set Verify $ Set Default [.'arch'] $ junk = 'F$Verify( 0 )' $ If ( P1 .nes. "" ) Then $ Goto 'P1' $! $ALL: $LIBVAXDATA: $! $! VAX Data Conversion Routines (upper case) $! $ Set Verify $ CC 'cflags' [--.Src]From_VAX_I2 $ CC 'cflags' [--.Src]From_VAX_I4 $ CC 'cflags' [--.Src]From_VAX_R4 $ CC 'cflags' [--.Src]From_VAX_D8 $ CC 'cflags' [--.Src]From_VAX_G8 $ CC 'cflags' [--.Src]From_VAX_H16 $ CC 'cflags' [--.Src]To_VAX_I2 $ CC 'cflags' [--.Src]To_VAX_I4 $ CC 'cflags' [--.Src]To_VAX_R4 $ CC 'cflags' [--.Src]To_VAX_D8 $ CC 'cflags' [--.Src]To_VAX_G8 $ CC 'cflags' [--.Src]To_VAX_H16 $ CC 'cflags' [--.Src]Is_Little_Endian $ junk = 'F$Verify( 0 )' $! $ If ( arch .eqs. "VAX" ) $ Then $ blocks = 18 $ modules = 13 $ Else $ blocks = 97 $ modules = 26 $ EndIf $! $! Create a static library $! $ Set Verify $ Library /Create=(Blocks:'blocks',Modules:'modules',Globals:'modules',- KeySize:16,History:0) 'lib_name' $ Library /Insert 'lib_name' - From_VAX_I2 , From_VAX_I4 , From_VAX_R4 , From_VAX_D8 , - From_VAX_G8 , From_VAX_H16 , To_VAX_I2 , To_VAX_I4 , - To_VAX_R4 , To_VAX_D8 , To_VAX_G8 , To_VAX_H16 , - Is_Little_Endian $ Purge 'lib_name'.olb $ Delete From_VAX_I2.obj;* , From_VAX_I4.obj;* , From_VAX_R4.obj;* , - From_VAX_D8.obj;* , From_VAX_G8.obj;* , From_VAX_H16.obj;* , - To_VAX_I2.obj;* , To_VAX_I4.obj;* , To_VAX_R4.obj;* , - To_VAX_D8.obj;* , To_VAX_G8.obj;* , To_VAX_H16.obj;* , - Is_Little_Endian.obj;* $ junk = 'F$Verify( 0 )' $! $ If ( arch .nes. "VAX" ) $ Then $! $ cflags = cflags + " /Names=As_Is" $! $! VAX Data Conversion Routines (lower case) $! $ Set Verify $ CC 'cflags' [--.Src]From_VAX_I2 $ CC 'cflags' [--.Src]From_VAX_I4 $ CC 'cflags' [--.Src]From_VAX_R4 $ CC 'cflags' [--.Src]From_VAX_D8 $ CC 'cflags' [--.Src]From_VAX_G8 $ CC 'cflags' [--.Src]From_VAX_H16 $ CC 'cflags' [--.Src]To_VAX_I2 $ CC 'cflags' [--.Src]To_VAX_I4 $ CC 'cflags' [--.Src]To_VAX_R4 $ CC 'cflags' [--.Src]To_VAX_D8 $ CC 'cflags' [--.Src]To_VAX_G8 $ CC 'cflags' [--.Src]To_VAX_H16 $ CC 'cflags' [--.Src]Is_Little_Endian $ junk = 'F$Verify( 0 )' $! $ Set Verify $ Library /Insert 'lib_name' - From_VAX_I2 , From_VAX_I4 , From_VAX_R4 , From_VAX_D8 , - From_VAX_G8 , From_VAX_H16 , To_VAX_I2 , To_VAX_I4 , - To_VAX_R4 , To_VAX_D8 , To_VAX_G8 , To_VAX_H16 , - Is_Little_Endian $ Delete From_VAX_I2.obj;* , From_VAX_I4.obj;* , From_VAX_R4.obj;* , - From_VAX_D8.obj;* , From_VAX_G8.obj;* , From_VAX_H16.obj;* , - To_VAX_I2.obj;* , To_VAX_I4.obj;* , To_VAX_R4.obj;* , - To_VAX_D8.obj;* , To_VAX_G8.obj;* , To_VAX_H16.obj;* , - Is_Little_Endian.obj;* $ junk = 'F$Verify( 0 )' $ EndIf $! $ Goto DONE $! $CLEAN: $! $ Set NoOn $ Set Verify $ Delete 'lib_name'.olb;* $ Delete From_VAX_I2.obj;* , From_VAX_I4.obj;* , From_VAX_R4.obj;* , - From_VAX_D8.obj;* , From_VAX_G8.obj;* , From_VAX_H16.obj;* , - To_VAX_I2.obj;* , To_VAX_I4.obj;* , To_VAX_R4.obj;* , - To_VAX_D8.obj;* , To_VAX_G8.obj;* , To_VAX_H16.obj;* , - Is_Little_Endian.obj;* $ junk = 'F$Verify( 0 )' $ Set On $! $DONE: $! $ Set Verify $ Set Default [-] $ junk = 'F$Verify( 0 )' $! $EXIT: $ Exit 1 + ( 0 * F$Verify( verify ) ) --- NEW FILE: readme --- An OpenVMS command procedure has been provided to compile libvaxdata on either OpenVMS/VAX or OpenVMS/Alpha using DEC/Compaq/HP C. To create libvaxdata.o from here: $ @make [ all | libvaxdata | clean ] The default make target is all. The library and all object files will be written to a subdirectory named for the system architecture returned by the DCL lexical function F$GetSYI( "ARCH_NAME" ). To link a C program with the library: $ Link program,[here.arch]libvaxdata/Library substituting the path to the library for here.arch (assuming it has not been moved or copied somewhere else). |
From: Patrick C. <pa...@us...> - 2005-10-25 07:32:25
|
Update of /cvsroot/linux-decnet/dnprogs/libvaxdata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7174 Added Files: Makefile libvaxdata.pdf Log Message: Add in libvaxdata --- NEW FILE: Makefile --- include ../Makefile.common ARCH=$(shell uname -m) ALL: cd linux; make -f makefile.gcc clean: cd linux; make -f makefile.gcc clean install: install -d $(prefix)/include install -m 0644 src/convert_vax_data.h $(prefix)/include install -d $(prefix)/lib install -m0644 linux/$(ARCH)/libvaxdata.a $(libprefix)/lib --- NEW FILE: libvaxdata.pdf --- %PDF-1.3 %Äåòåë§ó ÐÄÆ 2 0 obj << /Length 4 0 R /Filter /FlateDecode >> stream xÚMOÂ@ïýïQm»ÛÒo|!Q#PµºÚva» ü{·EØ6ÙLçíÌ,0¬ ÐG3!4á¼+Ò)ÍÍRdвªâ|ûMDq47Ìz #Çëi¹)ñQ¦ðÆ #WÔUÒ2'£eºEmjNXekP'çõ5çNE+è3×·$3eò~%Þ§¸i yÆYRÿÀ<gó0¾Ø¢giè+®*V¤K© ÕÒÈÊOg¿ mSÛÓ¦æ~XKø¤³Æ¹xÕT¤ñBºáü Ûë°Â6ù7ìæJLHK*1µÏ]ÀýêüüKæ±ÝÆ\»=mr*Ôæ0,Õ)}°Á®Î>Ãìj<ÊÔ®Ød©W´>¨/Õ@£ÿöE«µÛûÈmvª8¶CH5¡Ï³;3z1¬ê¤ endstream endobj 4 0 obj 359 endobj 1 0 obj << /Type /Page /Parent 10 0 R /Resources 3 0 R /Contents 2 0 R /MediaBox [0 0 612 792] >> endobj 3 0 obj << /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] /ColorSpace << /Cs1 [...1236 lines suppressed...] 0000128932 00000 n 0000129328 00000 n 0000149427 00000 n 0000149449 00000 n 0000149678 00000 n 0000150604 00000 n 0000155049 00000 n 0000155070 00000 n 0000155307 00000 n 0000155506 00000 n 0000164758 00000 n 0000164780 00000 n 0000165036 00000 n 0000165542 00000 n trailer << /Size 107 /Root 63 0 R /Info 106 0 R /ID [ <ff64a3e0382415494a64b1370d771dfe> <ff64a3e0382415494a64b1370d771dfe> ] >> startxref 165771 %%EOF |
Update of /cvsroot/linux-decnet/dnprogs/libvaxdata/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7174/src Added Files: convert_vax_data.c convert_vax_data.h from_vax_d8.c from_vax_d8_.c from_vax_g8.c from_vax_g8_.c from_vax_h16.c from_vax_h16_.c from_vax_i2.c from_vax_i2_.c from_vax_i4.c from_vax_i4_.c from_vax_r4.c from_vax_r4_.c from_vax_rhdr.c from_vax_rhdr_.c is_little_endian.c is_little_endian_.c to_vax_d8.c to_vax_d8_.c to_vax_g8.c to_vax_g8_.c to_vax_h16.c to_vax_h16_.c to_vax_i2.c to_vax_i2_.c to_vax_i4.c to_vax_i4_.c to_vax_r4.c to_vax_r4_.c Log Message: Add in libvaxdata --- NEW FILE: convert_vax_data.c --- /****************************************************************************** * * * convert_vax_data.c - Convert VAX-format data to/from Unix (IEEE) format. * * * * from_vax_i2() - Byte swap Integer*2 * * from_vax_i4() - Byte reverse Integer*4 * * from_vax_r4() - 32-bit VAX F_floating to IEEE S_floating * * from_vax_d8() - 64-bit VAX D_floating to IEEE T_floating * * from_vax_g8() - 64-bit VAX G_floating to IEEE T_floating * * from_vax_h16() - 128-bit VAX H_floating to Alpha X_floating * * * * to_vax_i2() - Byte swap Integer*2 * * to_vax_i4() - Byte reverse Integer*4 * * to_vax_r4() - 32-bit IEEE S_floating to VAX F_floating * * to_vax_d8() - 64-bit IEEE T_floating to VAX D_floating * * to_vax_g8() - 64-bit IEEE T_floating to VAX G_floating * * to_vax_h16() - 128-bit Alpha X_floating to VAX H_floating * * * * All calls take 3 arguments: * [...1355 lines suppressed...] *out++ = part.c[1]; *out++ = part.c[0]; *out++ = part.c[3]; *out++ = part.c[2]; part.l = part4; *out++ = part.c[1]; *out++ = part.c[0]; *out++ = part.c[3]; *out++ = part.c[2]; #endif } } #undef MANTISSA_MASK #undef MANTISSA_SIZE #undef HIDDEN_BIT #undef EXPONENT_ADJUSTMENT #endif /* #ifdef MAKE_TO_VAX_H16 */ --- NEW FILE: convert_vax_data.h --- /****************************************************************************** * * * convert_vax_data.h - Convert VAX-format data to/from Unix (IEEE) format. * * * * from_vax_i2() - Byte swap Integer*2 * * from_vax_i4() - Byte reverse Integer*4 * * from_vax_r4() - 32-bit VAX F_floating to IEEE S_floating * * from_vax_d8() - 64-bit VAX D_floating to IEEE T_floating * * from_vax_g8() - 64-bit VAX G_floating to IEEE T_floating * * from_vax_h16() - 128-bit VAX H_floating to Alpha X_floating * * * * to_vax_i2() - Byte swap Integer*2 * * to_vax_i4() - Byte reverse Integer*4 * * to_vax_r4() - 32-bit IEEE S_floating to VAX F_floating * * to_vax_d8() - 64-bit IEEE T_floating to VAX D_floating * * to_vax_g8() - 64-bit IEEE T_floating to VAX G_floating * * to_vax_h16() - 128-bit Alpha X_floating to VAX H_floating * * * * All calls take 3 arguments: * * * * C declaration: #include "convert_vax_data.h" * * usage: name( in_array, out_array, &count ); * * * * Fortran usage: Call NAME( in_array, out_array, count ) * * * * The in_array and out_array parameters may refer to the same object. * * * * * * VAXes (as well as the Intel 80x86 family) store integers in 2's complement * * format, ordering the bytes in memory from low-order to high-order (collo- * * quially called little-endian format). Most Unix machines (Sun, IBM, HP) * * also store integers in 2's complement format, but use the opposite (so * * called big-endian) byte ordering. * * * * A VAX integer is converted to (big-endian) Unix format by reversing the * * byte order. * * * * Most Unix machines implement the ANSI/IEEE 754-1985 floating-point arith- * * metic standard. VAX and IEEE formats are similar (after byte-swapping). * * The high-order bit is a sign bit (s). This is followed by a biased expo- * * nent (e), and a (usually) hidden-bit normalized mantissa (m). They differ * * in the number used to bias the exponent, the location of the implicit bi- * * nary point for the mantissa, and the representation of exceptional numbers * * (e.g., +/-infinity). * * * * VAX floating-point formats: (-1)^s * 2^(e-bias) * 0.1m * * * * 31 15 0 * * | | | * * F_floating mmmmmmmmmmmmmmmmseeeeeeeemmmmmmm bias = 128 * * D_floating mmmmmmmmmmmmmmmmseeeeeeeemmmmmmm bias = 128 * * mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm * * G_floating mmmmmmmmmmmmmmmmseeeeeeeeeeemmmm bias = 1024 * * mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm * * H_floating mmmmmmmmmmmmmmmmseeeeeeeeeeeeeee bias = 16384 * * mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm * * mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm * * mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm * * * * IEEE floating-point formats: (-1)^s * 2^(e-bias) * 1.m * * * * 31 15 0 * * | | | * * S_floating seeeeeeeemmmmmmmmmmmmmmmmmmmmmmm bias = 127 * * T_floating seeeeeeeeeeemmmmmmmmmmmmmmmmmmmm bias = 1023 * * mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm * * X_floating seeeeeeeeeeeeeeemmmmmmmmmmmmmmmm bias = 16383 * * mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm * * mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm * * mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm * * * * A VAX floating-point number is converted to IEEE floating-point format by * * subtracting (1+VAX_bias-IEEE_bias) from the exponent field to (1) adjust * * from VAX 0.1m hidden-bit normalization to IEEE 1.m hidden-bit normaliza- * * tion and (2) adjust the bias from VAX format to IEEE format. True zero * * [s=e=m=0] and dirty zero [s=e=0, m<>0] are special cases which must be * * recognized and handled separately. * * * * Numbers whose absolute value is too small to represent in the normalized * * IEEE format illustrated above are converted to subnormal form [e=0, m>0]: * * (-1)^s * 2^(1-bias) * 0.m. Numbers whose absolute value is too small to * * represent in subnormal form are set to 0.0 (silent underflow). * * * * Note: If the fractional part of the VAX floating-point number is too large * * for the corresponding IEEE floating-point format, bits are simply * * discarded from the right. Thus, the remaining fractional part is * * chopped, not rounded to the lowest-order bit. This can only occur * * when the conversion requires IEEE subnormal form. * * * * A VAX floating-point reserved operand [s=1, e=0, m=any] causes a SIGFPE * * exception to be raised. The converted result is set to zero. * * * * Conversely, an IEEE floating-point number is converted to VAX floating- * * point format by adding (1+VAX_bias-IEEE_bias) to the exponent field. * * +zero [s=e=m=0], -zero [s=1, e=m=0], infinities [s=X, e=all-1's, m=0], and * * NaNs [s=X, e=all-1's, m<>0] are special cases which must be recognized and * * handled separately. Infinities and NaNs cause a SIGFPE exception to be * * raised. The result returned has the largest VAX exponent [e=all-1's] and * * zero mantissa [m=0] with the same sign as the original. * * * * Numbers whose absolute value is too small to represent in the normalized * * VAX format illustrated above are set to 0.0 (silent underflow). (VAX * * floating-point format does not support subnormal numbers.) Numbers whose * * absolute value exceeds the largest representable VAX-format number cause a * * SIGFPE exception to be raised (overflow). (VAX floating-point format does * * not have reserved bit patterns for infinities and not-a-numbers [NaNs].) * * The result returned has the largest VAX exponent and mantissa [e=m= * * all-1's] with the same sign as the original. * * * * * * Two variants of convert_vax_data.c are available using IS_LITTLE_ENDIAN * * and APPEND_UNDERSCORE. If IS_LITTLE_ENDIAN is defined as 0 (false), then * * the conversions are performed for a big-endian machine, i.e., byte reor- * * dering is performed for all data types. If IS_LITTLE_ENDIAN is defined as * * 1 (true), then no reordering is performed. (Integers are identical to VAX * * format.) * * * * If IS_LITTLE_ENDIAN is not defined, then it is defined as 1 (true) if any * * of the following macros are defined: * * * * vax __vax vms __vms __alpha DEC VAX C, GNU C on a DEC VAX or a DEC * * Alpha, DEC C * * M_I86 _M_IX86 __M_ALPHA Microsoft 80x86 C or Microsoft Visual C++ * * on an Intel x86 or a DEC Alpha * * i386 __i386 Sun C, GNU C, or Intel C on an Intel x86 * * __x86_64 __x86_64__ GNU C or Portland Group C on an AMD * * Opteron or an Intel EM64T * * * * If APPEND_UNDERSCORE is defined, the entry point names are compiled with * * an underscore appended. This is required so that they can be called by * * Fortran in cases where the Fortran compiler appends an underscore to * * externally called routines (e.g., Sun Fortran). * * * * Normally, all routines are compiled into a single object module. To com- * * pile a single routine into its own module, define MAKE_routine_name, sub- * * stituting the upper-case name of the routine for routine_name. For exam- * * ple, MAKE_TO_VAX_I2. (This is useful, for example, to insert the routines * * into a library such that a linker may extract only the routines actually * * needed by a particular program.) * * * * convert_vax_data.c assumes an ANSI C compiler, 8-bit chars, 16-bit shorts, * * and 32-bit ints. * * * * * * References: ANSI/IEEE Std 754-1985, IEEE Standard for Binary Floating- * * Point Arithmetic, Institute of Electrical and Electronics * * Engineers * * Brunner, Richard A., Ed., 1991, VAX Architecture Reference * * Manual, Second Edition, Digital Press * * Sites, Richard L., and Witek, Richard T., 1995, Alpha AXP * * Architecture Reference Manual, Second Edition, Digital * * Press * * * * Author: Lawrence M. Baker * * U.S. Geological Survey * * 345 Middlefield Road MS977 * * Menlo Park, CA 94025 * * ba...@us... * * * * Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- * * sion Routines, US Geological Survey, Open-File Report no. * * 2005-XXX, nn p. * * * * * * Disclaimer * * * * Although this program has been used by the USGS, no warranty, expressed or * * implied, is made by the USGS or the United States Government as to the * * accuracy and functioning of the program and related program material, nor * * shall the fact of distribution constitute any such warranty, and no * * responsibility is assumed by the USGS in connection therewith. * * * * * * Modification History: * * * * 8-Mar-2001 L. M. Baker Original version. * * Define upcased and underscore-appended * * variants. * * 9-Mar-2001 L. M. Baker Add #ifndef _CONVERT_VAX_DATA guard. * * 16-Sep-2005 L. M. Baker Correct the diagram of IEEE X_floating * * (exponent is 15 bits, not 11 bits). * * 19-Sep-2005 L. M. Baker Add fixups for IEEE-to-VAX conversion * * faults (+-infinity, +-NaN, overflow). * * * ******************************************************************************/ #ifndef _CONVERT_VAX_DATA #define _CONVERT_VAX_DATA #ifndef FORTRAN_LINKAGE #define FORTRAN_LINKAGE #endif #ifdef UPCASE #define from_vax_i2 FROM_VAX_I2 #define from_vax_i4 FROM_VAX_I4 #define from_vax_r4 FROM_VAX_R4 #define from_vax_d8 FROM_VAX_D8 #define from_vax_g8 FROM_VAX_G8 #define from_vax_h16 FROM_VAX_H16 #define to_vax_i2 TO_VAX_I2 #define to_vax_i4 TO_VAX_I4 #define to_vax_r4 TO_VAX_R4 #define to_vax_d8 TO_VAX_D8 #define to_vax_g8 TO_VAX_G8 #define to_vax_h16 TO_VAX_H16 #endif #ifdef APPEND_UNDERSCORE #define from_vax_i2 from_vax_i2##_ #define from_vax_i4 from_vax_i4##_ #define from_vax_r4 from_vax_r4##_ #define from_vax_d8 from_vax_d8##_ #define from_vax_g8 from_vax_g8##_ #define from_vax_h16 from_vax_h16##_ #define to_vax_i2 to_vax_i2##_ #define to_vax_i4 to_vax_i4##_ #define to_vax_r4 to_vax_r4##_ #define to_vax_d8 to_vax_d8##_ #define to_vax_g8 to_vax_g8##_ #define to_vax_h16 to_vax_h16##_ #endif void FORTRAN_LINKAGE from_vax_i2( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE from_vax_i4( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE from_vax_r4( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE from_vax_d8( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE from_vax_g8( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE from_vax_h16( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE to_vax_i2( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE to_vax_i4( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE to_vax_r4( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE to_vax_d8( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE to_vax_g8( const void *inbuf, void *outbuf, const int *count ); void FORTRAN_LINKAGE to_vax_h16( const void *inbuf, void *outbuf, const int *count ); #endif /* #ifndef _CONVERT_VAX_DATA */ --- NEW FILE: from_vax_d8.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module from_vax_d8 #endif #define MAKE_FROM_VAX_D8 #include "convert_vax_data.c" --- NEW FILE: from_vax_d8_.c --- #define APPEND_UNDERSCORE #include "from_vax_d8.c" --- NEW FILE: from_vax_g8.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module from_vax_g8 #endif #define MAKE_FROM_VAX_G8 #include "convert_vax_data.c" --- NEW FILE: from_vax_g8_.c --- #define APPEND_UNDERSCORE #include "from_vax_g8.c" --- NEW FILE: from_vax_h16.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module from_vax_h16 #endif #define MAKE_FROM_VAX_H16 #include "convert_vax_data.c" --- NEW FILE: from_vax_h16_.c --- #define APPEND_UNDERSCORE #include "from_vax_h16.c" --- NEW FILE: from_vax_i2.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module from_vax_i2 #endif #define MAKE_FROM_VAX_I2 #include "convert_vax_data.c" --- NEW FILE: from_vax_i2_.c --- #define APPEND_UNDERSCORE #include "from_vax_i2.c" --- NEW FILE: from_vax_i4.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module from_vax_i4 #endif #define MAKE_FROM_VAX_I4 #include "convert_vax_data.c" --- NEW FILE: from_vax_i4_.c --- #define APPEND_UNDERSCORE #include "from_vax_i4.c" --- NEW FILE: from_vax_r4.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module from_vax_r4 #endif #define MAKE_FROM_VAX_R4 #include "convert_vax_data.c" --- NEW FILE: from_vax_r4_.c --- #define APPEND_UNDERSCORE #include "from_vax_r4.c" --- NEW FILE: from_vax_rhdr.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module from_vax_rhdr #endif #define MAKE_FROM_VAX_RHDR #include "convert_vfbb_headers.c" --- NEW FILE: from_vax_rhdr_.c --- #define APPEND_UNDERSCORE #include "from_vax_rhdr.c" --- NEW FILE: is_little_endian.c --- /****************************************************************************** * * * is_little_endian.c - Predicate for determining if machine architecture is * * "little-endian", i.e., integers are stored low-order * * to high-order in ascending memory addresses (ala the * * DEC PDP-11 and VAX family and the Intel x86 family). * * * * * * Reference: Kalev, Danny, 1999, The ANSI/ISO C++ Professional Program- * * mer's Handbook, Que Corporation, "Detecting a Machine's * * Endian-ness" * * * * Author: Lawrence M. Baker * * U.S. Geological Survey * * 345 Middlefield Road MS977 * * Menlo Park, CA 94025 * * ba...@us... * * * * Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- * * sion Routines, US Geological Survey, Open-File Report no. * * 2005-XXX, nn p. * * * * * * Disclaimer * * * * Although this program has been used by the USGS, no warranty, expressed or * * implied, is made by the USGS or the United States Government as to the * * accuracy and functioning of the program and related program material, nor * * shall the fact of distribution constitute any such warranty, and no * * responsibility is assumed by the USGS in connection therewith. * * * * * * Modification History: * * * * 22-Feb-2001 L. M. Baker Original version. * * 2-Sep-2005 L. M. Baker Remove #include "libvfbb.h". * * Conditionally #define FORTRAN_LINKAGE. * * 12-Oct-2005 L. M. Baker Add APPEND_UNDERSCORE option. * * * ******************************************************************************/ #if defined( __VMS ) && defined( __DECC ) #pragma module is_little_endian #endif #ifndef FORTRAN_LINKAGE #define FORTRAN_LINKAGE #endif #ifdef APPEND_UNDERSCORE #define is_little_endian is_little_endian##_ #endif int FORTRAN_LINKAGE is_little_endian() { static const union probe { unsigned int num; unsigned char bytes[sizeof( unsigned int)]; } p = { 1U }; /* Initialize first member of p with unsigned 1 */ return ( p.bytes[0] == 1U ); /* p.bytes[0] is 0 on a big endian machine */ } --- NEW FILE: is_little_endian_.c --- #define APPEND_UNDERSCORE #include "is_little_endian.c" --- NEW FILE: to_vax_d8.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module to_vax_d8 #endif #define MAKE_TO_VAX_D8 #include "convert_vax_data.c" --- NEW FILE: to_vax_d8_.c --- #define APPEND_UNDERSCORE #include "to_vax_d8.c" --- NEW FILE: to_vax_g8.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module to_vax_g8 #endif #define MAKE_TO_VAX_G8 #include "convert_vax_data.c" --- NEW FILE: to_vax_g8_.c --- #define APPEND_UNDERSCORE #include "to_vax_g8.c" --- NEW FILE: to_vax_h16.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module to_vax_h16 #endif #define MAKE_TO_VAX_H16 #include "convert_vax_data.c" --- NEW FILE: to_vax_h16_.c --- #define APPEND_UNDERSCORE #include "to_vax_h16.c" --- NEW FILE: to_vax_i2.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module to_vax_i2 #endif #define MAKE_TO_VAX_I2 #include "convert_vax_data.c" --- NEW FILE: to_vax_i2_.c --- #define APPEND_UNDERSCORE #include "to_vax_i2.c" --- NEW FILE: to_vax_i4.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module to_vax_i4 #endif #define MAKE_TO_VAX_I4 #include "convert_vax_data.c" --- NEW FILE: to_vax_i4_.c --- #define APPEND_UNDERSCORE #include "to_vax_i4.c" --- NEW FILE: to_vax_r4.c --- #if defined( __VMS ) && defined( __DECC ) #pragma module to_vax_r4 #endif #define MAKE_TO_VAX_R4 #include "convert_vax_data.c" --- NEW FILE: to_vax_r4_.c --- #define APPEND_UNDERSCORE #include "to_vax_r4.c" |
From: Patrick C. <pa...@us...> - 2005-10-25 07:32:23
|
Update of /cvsroot/linux-decnet/dnprogs/libvaxdata/solaris In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7174/solaris Added Files: makefile.cc makefile.gcc makefile.solaris readme Log Message: Add in libvaxdata --- NEW FILE: makefile.cc --- # # makefile.cc - Make library of functions for reading and writing VAX format # data for Solaris using Sun C (cc). # # Shell command syntax: make -f makefile.cc [ all | libvaxdata | clean ] # # -O (standard optimization) -Xc (strict ANSI) CC = cc CFLAGS = -O -Xc include makefile.solaris --- NEW FILE: makefile.gcc --- # # makefile.gcc - Make library of functions for reading and writing VAX format # data for Solaris using GNU C (gcc). # # Shell command syntax: make -f makefile.gcc [ all | libvaxdata | clean ] # # -O3 (highest level of optimization) -ansi (strict ANSI) CC = gcc CFLAGS = -O3 -ansi include makefile.solaris --- NEW FILE: makefile.solaris --- ################################################################################ # # # makefile.solaris - Make library of functions for reading and writing VAX # # format data for Solaris. # # # # Shell command syntax: make -f makefile.solaris \ # # [ CC="c_compiler" ] \ # # [ CFLAGS="c_compiler_flags" ] \ # # [ all | libvaxdata | clean ] # # # # # # Author: Lawrence M. Baker # # U.S. Geological Survey # # 345 Middlefield Road MS977 # # Menlo Park, CA 94025 # # ba...@us... # # # # Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- # # sion Routines, US Geological Survey, Open-File Report no. # # 2005-XXX, nn p. # # # # # # Disclaimer # # # # Although this program has been used by the USGS, no warranty, expressed or # # implied, is made by the USGS or the United States Government as to the # # accuracy and functioning of the program and related program material, nor # # shall the fact of distribution constitute any such warranty, and no # # responsibility is assumed by the USGS in connection therewith. # # # # # # Modification History: # # # # 2-Sep-2005 L. M. Baker Original version (from make.libvfbb). # # 12-Oct-2005 L. M. Baker Use custom compile rule for is_little_endian. # # # ################################################################################ # GNU C # -O3 (highest level of optimization) -ansi (strict ANSI) #CC = gcc #CFLAGS = -O3 -ansi # Sun C # -O (standard optimization) -Xc (strict ANSI) #CC = cc #CFLAGS = -O -Xc # sparc on Sun SPARC architecture; i386 on Intel 80x86 architecture ARCH:sh = uname -p LIB_NAME = libvaxdata OBJS = from_vax_i2.o from_vax_i2_.o from_vax_i4.o \ from_vax_i4_.o from_vax_r4.o from_vax_r4_.o \ from_vax_d8.o from_vax_d8_.o from_vax_g8.o \ from_vax_g8_.o from_vax_h16.o from_vax_h16_.o \ to_vax_i2.o to_vax_i2_.o to_vax_i4.o \ to_vax_i4_.o to_vax_r4.o to_vax_r4_.o \ to_vax_d8.o to_vax_d8_.o to_vax_g8.o \ to_vax_g8_.o to_vax_h16.o to_vax_h16_.o \ is_little_endian.o is_little_endian_.o VPATH = ../../src all: $(LIB_NAME) $(LIB_NAME): test -d $(ARCH) || mkdir $(ARCH) cd $(ARCH) ; $(MAKE) -f ../makefile.solaris \ CC="$(CC)" \ CFLAGS="$(CFLAGS)" \ $(LIB_NAME).a cd $(ARCH) ; $(RM) $(OBJS) $(LIB_NAME).a: $(OBJS) ar -r -c $(LIB_NAME).a $(OBJS) ranlib $(LIB_NAME).a is_little_endian.o: $(CC) -c -o $@ $? is_little_endian_.o: $(CC) -c -o $@ $? clean: cd $(ARCH) ; $(RM) -f $(LIB_NAME).a $(OBJS) --- NEW FILE: readme --- Two makefiles have been provided for Solaris: makefile.gcc GNU C (gcc) makefile.cc Sun C (cc) To create libvaxdata.a from here: # make -f makefile.xxx [ all | libvaxdata | clean ] substituting gcc or cc for xxx. The default make target is all. The library and all object files will be written to a subdirectory named for the system architecture returned by "uname -p". To link a C program program.o with the library: # xxx -o program program.o -lvaxdata -Lhere/arch substituting gcc or cc for xxx, and the path to the library for here/arch (assuming it has not been moved or copied somewhere else). To link a Fortran program with the library, substitute g77 or f77 for xxx, plus the path to the library for here/arch. |
From: Patrick C. <pa...@us...> - 2005-10-25 07:32:23
|
Update of /cvsroot/linux-decnet/dnprogs/libvaxdata/macos9 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7174/macos9 Added Files: make.macos9 make.mrc make.mwcc readme Log Message: Add in libvaxdata --- NEW FILE: make.macos9 --- ################################################################################ # # # make.macos9 - Make library of functions for reading and writing VAX format # # data for Macintosh PowerPC. # # # # MPW command syntax: make.macos9 [ all | libvaxdata | clean ] # # # # # # Author: Lawrence M. Baker # # U.S. Geological Survey # # 345 Middlefield Road MS977 # # Menlo Park, CA 94025 # # ba...@us... # # # # Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- # # sion Routines, US Geological Survey, Open-File Report no. # # 2005-XXX, nn p. # # # # # # Disclaimer # # # # Although this program has been used by the USGS, no warranty, expressed or # # implied, is made by the USGS or the United States Government as to the # # accuracy and functioning of the program and related program material, nor # # shall the fact of distribution constitute any such warranty, and no # # responsibility is assumed by the USGS in connection therewith. # # # # # # Modification History: # # # # 2-Sep-2005 L. M. Baker Original version (from make.libvfbb). # # 6-Oct-2005 L. M. Baker Use custom compile rule for is_little_endian. # # # ################################################################################ # Apple MrC # -opt speed (optimize for speed) -ansi strict (strict ANSI) #Set CC "MrC" #Set CFlags "-opt speed -ansi strict" # Metrowerks CodeWarrior C # -opt all (optimize for speed) -ansi on (strict ANSI) #Set CC "mwcc" #Set CFlags "-opt all -ansi on" Set LibName "libvaxdata" If ( ( "{1}" == "" ) || ( "{1}" == "all" ) || ( "{1}" == "{LibName}" ) ) Set Echo 1 # # VAX Data Conversion Routines # {CC} -o from_vax_i2.c.o {CFlags} ::src:from_vax_i2.c {CC} -o from_vax_i4.c.o {CFlags} ::src:from_vax_i4.c {CC} -o from_vax_r4.c.o {CFlags} ::src:from_vax_r4.c {CC} -o from_vax_d8.c.o {CFlags} ::src:from_vax_d8.c {CC} -o from_vax_g8.c.o {CFlags} ::src:from_vax_g8.c {CC} -o from_vax_h16.c.o {CFlags} ::src:from_vax_h16.c {CC} -o to_vax_i2.c.o {CFlags} ::src:to_vax_i2.c {CC} -o to_vax_i4.c.o {CFlags} ::src:to_vax_i4.c {CC} -o to_vax_r4.c.o {CFlags} ::src:to_vax_r4.c {CC} -o to_vax_d8.c.o {CFlags} ::src:to_vax_d8.c {CC} -o to_vax_g8.c.o {CFlags} ::src:to_vax_g8.c {CC} -o to_vax_h16.c.o {CFlags} ::src:to_vax_h16.c {CC} -o is_little_endian.c.o ::src:is_little_endian.c # # Create a PPC static library # PPCLink -o {LibName}.o -xm l ¶ from_vax_i2.c.o from_vax_i4.c.o from_vax_r4.c.o ¶ from_vax_d8.c.o from_vax_g8.c.o from_vax_h16.c.o ¶ to_vax_i2.c.o to_vax_i4.c.o to_vax_r4.c.o ¶ to_vax_d8.c.o to_vax_g8.c.o to_vax_h16.c.o ¶ is_little_endian.c.o Delete -i from_vax_i2.c.o from_vax_i4.c.o from_vax_r4.c.o ¶ from_vax_d8.c.o from_vax_g8.c.o from_vax_h16.c.o ¶ to_vax_i2.c.o to_vax_i4.c.o to_vax_r4.c.o ¶ to_vax_d8.c.o to_vax_g8.c.o to_vax_h16.c.o ¶ is_little_endian.c.o Set Echo 0 Else If ( "{1}" == "clean" ) Set Echo 1 Delete -i {LibName}.o Delete -i from_vax_i2.c.o from_vax_i4.c.o from_vax_r4.c.o ¶ from_vax_d8.c.o from_vax_g8.c.o from_vax_h16.c.o ¶ to_vax_i2.c.o to_vax_i4.c.o to_vax_r4.c.o ¶ to_vax_d8.c.o to_vax_g8.c.o to_vax_h16.c.o ¶ is_little_endian.c.o Set Echo 0 Else Echo "MPW command syntax: make [ all | libvaxdata | clean ]" End --- NEW FILE: make.mrc --- # # make.mrc - Make library of functions for reading and writing VAX format data # for Macintosh PowerPC using Apple MPW C (MrC). # # MPW command syntax: make.mrc [ all | libvaxdata | clean ] # # -opt speed (optimize for speed) -ansi strict (strict ANSI) Set CC "MrC" Set CFlags "-opt speed -ansi strict" Execute make.macos9 --- NEW FILE: make.mwcc --- # # make.mwcc - Make library of functions for reading and writing VAX format data # for Macintosh PowerPC using Metrowerks CodeWarrior C (mwcc). # # MPW command syntax: make.mwcc [ all | libvaxdata | clean ] # # -opt all (optimize for speed) -ansi on (strict ANSI) Set CC "mwcc" Set CFlags "-opt all -ansi on" Execute make.macos9 --- NEW FILE: readme --- Two MPW scripts have been provided for Mac OS 9: make.mrc Apple/Motorola C (MrC) make.mwcc Metrowerks CodeWarrior C (mwcc) To create libvaxdata.o from here: make.xxx [ all | libvaxdata | clean ] substituting mrc or mwcc for xxx. The default make target is all. The library and all object files will be written here. Note The MPW Shell requires that the make.* files have Macintosh line endings (CR), not Unix line endings (LF) or Windows/DOS line endings (CR-LF). To link a C program with the library: PPCLink -o program program.c.o :here:libvaxdata.o substituting the path to the library for here (assuming it has not been moved or copied somewhere else). |
From: Patrick C. <pa...@us...> - 2005-10-25 07:32:23
|
Update of /cvsroot/linux-decnet/dnprogs/libvaxdata/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7174/macosx Added Files: makefile.darwin makefile.gcc makefile.xlc readme Log Message: Add in libvaxdata --- NEW FILE: makefile.darwin --- ################################################################################ # # # makefile.darwin - Make library of functions for reading and writing VAX # # format data for Macintosh OS X. # # # # Shell command syntax: make -f makefile.darwin \ # # [ CC="c_compiler" ] \ # # [ CFLAGS="c_compiler_flags" ] \ # # [ all | libvaxdata | clean ] # # # # # # Author: Lawrence M. Baker # # U.S. Geological Survey # # 345 Middlefield Road MS977 # # Menlo Park, CA 94025 # # ba...@us... # # # # Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- # # sion Routines, US Geological Survey, Open-File Report no. # # 2005-XXX, nn p. # # # # # # Disclaimer # # # # Although this program has been used by the USGS, no warranty, expressed or # # implied, is made by the USGS or the United States Government as to the # # accuracy and functioning of the program and related program material, nor # # shall the fact of distribution constitute any such warranty, and no # # responsibility is assumed by the USGS in connection therewith. # # # # # # Modification History: # # # # 2-Sep-2005 L. M. Baker Original version (from make.libvfbb). # # 12-Oct-2005 L. M. Baker Use custom compile rule for is_little_endian. # # # ################################################################################ # GNU C # -O3 (highest level of optimization) -ansi (strict ANSI) #CC = gcc #CFLAGS = -O3 -ansi # IBM XL C # -O3 (intensive optimization) -qlanglvl=stdc89 (strict ANSI) # -D_ANSI_SOURCE (for signal.h) -D_POSIX_SOURCE (for {ppc,i386}/endian.h) #CC = xlc #CFLAGS = -O3 -qlanglvl=stdc89 -D_ANSI_SOURCE -D_POSIX_SOURCE # powerpc on IBM PowerPC; ??? on Intel x86 ARCH = `uname -p` LIB_NAME = libvaxdata OBJS = from_vax_i2.o from_vax_i2_.o from_vax_i4.o \ from_vax_i4_.o from_vax_r4.o from_vax_r4_.o \ from_vax_d8.o from_vax_d8_.o from_vax_g8.o \ from_vax_g8_.o from_vax_h16.o from_vax_h16_.o \ to_vax_i2.o to_vax_i2_.o to_vax_i4.o \ to_vax_i4_.o to_vax_r4.o to_vax_r4_.o \ to_vax_d8.o to_vax_d8_.o to_vax_g8.o \ to_vax_g8_.o to_vax_h16.o to_vax_h16_.o \ is_little_endian.o is_little_endian_.o VPATH = ../../src all: $(LIB_NAME) $(LIB_NAME): test -d $(ARCH) || mkdir $(ARCH) cd $(ARCH) ; $(MAKE) -f ../makefile.darwin \ CC="$(CC)" \ CFLAGS="$(CFLAGS)" \ $(LIB_NAME).a cd $(ARCH) ; $(RM) $(OBJS) $(LIB_NAME).a: $(OBJS) ar -r -c $(LIB_NAME).a $(OBJS) ranlib $(LIB_NAME).a is_little_endian.o: is_little_endian.c $(CC) -c -o $@ $? is_little_endian_.o: is_little_endian_.c $(CC) -c -o $@ $? clean: cd $(ARCH) ; $(RM) -f $(LIB_NAME).a $(OBJS) --- NEW FILE: makefile.gcc --- # # makefile.gcc - Make library of functions for reading and writing VAX format # data for Macintosh OS X using GNU C (gcc). # # Shell command syntax: make -f makefile.gcc [ all | libvaxdata | clean ] # # -O3 (highest level of optimization) -ansi (strict ANSI) CC = gcc CFLAGS = -O3 -ansi include makefile.darwin --- NEW FILE: makefile.xlc --- # # makefile.xlc - Make library of functions for reading and writing VAX format # data for Macintosh OS X using IBM XL C (xlc). # # Shell command syntax: make -f makefile.xlc [ all | libvaxdata | clean ] # # -O3 (intensive optimization) -qlanglvl=stdc89 (strict ANSI) # -D_ANSI_SOURCE (for signal.h) -D_POSIX_SOURCE (for {ppc,i386}/endian.h) CC = xlc CFLAGS = -O3 -qlanglvl=stdc89 -D_ANSI_SOURCE -D_POSIX_SOURCE include makefile.darwin --- NEW FILE: readme --- Two makefiles have been provided for Mac OS X: makefile.gcc GNU C (gcc) makefile.xlc IBM XL C (xlc) To create libvaxdata.a from here: # make -f makefile.xxx [ all | libvaxdata | clean ] substituting gcc or xlc for xxx. The default make target is all. The library and all object files will be written to a subdirectory named for the system architecture returned by "uname -p". To link a C program with the library: # xxx -o program program.o -lvaxdata -Lhere/arch substituting gcc or xlc for xxx, and the path to the library for here/arch (assuming it has not been moved or copied somewhere else). To link a Fortran program with the library, substitute g77 or xlf (xlf90, xlf95) for xxx, plus the path to the library for here/arch. |
From: Patrick C. <pa...@us...> - 2005-10-25 07:32:23
|
Update of /cvsroot/linux-decnet/dnprogs/libvaxdata/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7174/linux Added Files: makefile.gcc makefile.icc makefile.linux makefile.pgcc readme Log Message: Add in libvaxdata --- NEW FILE: makefile.gcc --- # # makefile.gcc - Make library of functions for reading and writing VAX format # data for Linux using GNU C (gcc). # # Shell command syntax: make -f makefile.gcc [ all | libvaxdata | clean ] # # -O3 (highest level of optimization) -ansi (strict ANSI) CC = gcc CFLAGS = -O3 -ansi include makefile.linux --- NEW FILE: makefile.icc --- # # makefile.icc - Make library of functions for reading and writing VAX format # data for Linux using Intel C (icc). # # Shell command syntax: make -f makefile.icc [ all | libvaxdata | clean ] # # -O3 (highest level of optimization) -ansi (strict ANSI) CC = icc CFLAGS = -O3 -ansi include makefile.linux --- NEW FILE: makefile.linux --- ################################################################################ # # # makefile.linux - Make library of functions for reading and writing VAX # # format data for Linux. # # # # Shell command syntax: make -f makefile.linux \ # # [ CC="c_compiler" ] \ # # [ CFLAGS="c_compiler_flags" ] \ # # [ all | libvaxdata | clean ] # # # # # # Author: Lawrence M. Baker # # U.S. Geological Survey # # 345 Middlefield Road MS977 # # Menlo Park, CA 94025 # # ba...@us... # # # # Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- # # sion Routines, US Geological Survey, Open-File Report no. # # 2005-XXX, nn p. # # # # # # Disclaimer # # # # Although this program has been used by the USGS, no warranty, expressed or # # implied, is made by the USGS or the United States Government as to the # # accuracy and functioning of the program and related program material, nor # # shall the fact of distribution constitute any such warranty, and no # # responsibility is assumed by the USGS in connection therewith. # # # # # # Modification History: # # # # 2-Sep-2005 L. M. Baker Original version (from make.libvfbb). # # 5-Oct-2005 L. M. Baker Use custom compile rule for is_little_endian. # # # ################################################################################ # GNU C # -O3 (highest level of optimization) -ansi (strict ANSI) #CC = gcc #CFLAGS = -O3 -ansi # Intel C # -O3 (highest level of optimization) -ansi (strict ANSI) #CC = icc #CFLAGS = -O3 -ansi # Portland Group C # -O3 (highest level of optimization) -Xa (strict ANSI) #CC = pgcc #CFLAGS = -O3 -Xa # i686 on Intel PIII/P4; x86_64 on AMD Opteron/Intel EM64T ARCH = `uname -m` LIB_NAME = libvaxdata OBJS = from_vax_i2.o from_vax_i2_.o from_vax_i4.o \ from_vax_i4_.o from_vax_r4.o from_vax_r4_.o \ from_vax_d8.o from_vax_d8_.o from_vax_g8.o \ from_vax_g8_.o from_vax_h16.o from_vax_h16_.o \ to_vax_i2.o to_vax_i2_.o to_vax_i4.o \ to_vax_i4_.o to_vax_r4.o to_vax_r4_.o \ to_vax_d8.o to_vax_d8_.o to_vax_g8.o \ to_vax_g8_.o to_vax_h16.o to_vax_h16_.o \ is_little_endian.o is_little_endian_.o VPATH = ../../src all: $(LIB_NAME) $(LIB_NAME): test -d $(ARCH) || mkdir $(ARCH) cd $(ARCH) ; $(MAKE) -f ../makefile.linux \ CC="$(CC)" \ CFLAGS="$(CFLAGS)" \ $(LIB_NAME).a cd $(ARCH) ; $(RM) $(OBJS) $(LIB_NAME).a: $(OBJS) ar -r -c $(LIB_NAME).a $(OBJS) ranlib $(LIB_NAME).a is_little_endian.o: is_little_endian.c $(CC) -c -o $@ $? is_little_endian_.o: is_little_endian_.c $(CC) -c -o $@ $? clean: cd $(ARCH) ; $(RM) -f $(LIB_NAME).a $(OBJS) --- NEW FILE: makefile.pgcc --- # # makefile.pgcc - Make library of functions for reading and writing VAX format # data for Linux using Portland Group C (pgcc). # # Shell command syntax: make -f makefile.pgcc [ all | libvaxdata | clean ] # # -O3 (highest level of optimization) -Xa (strict ANSI) CC = pgcc CFLAGS = -O3 -Xa include makefile.linux --- NEW FILE: readme --- Three makefiles have been provided for Linux: makefile.gcc GNU C (gcc) makefile.icc Intel C (icc) makefile.pgcc Portland Group C (pgcc) To create libvaxdata.a from here: # make -f makefile.xxx [ all | libvaxdata | clean ] substituting gcc, icc, or pgcc for xxx. The default make target is all. The library and all object files will be written to a subdirectory named for the system architecture returned by "uname -m". To link a C program with the library: # xxx -o program program.o -lvaxdata -Lhere/arch substituting gcc, icc, or pgcc for xxx, and the path to the library for here/arch (assuming it has not been moved or copied somewhere else). To link a Fortran program with the library, substitute g77, ifort, or pgf77 (pgf90, pgf95) for xxx, plus the path to the library for here/arch. |
From: Patrick C. <pa...@us...> - 2005-10-25 07:32:23
|
Update of /cvsroot/linux-decnet/dnprogs/libvaxdata/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7174/win32 Added Files: cwmake.bat readme vcmake.bat Log Message: Add in libvaxdata --- NEW FILE: cwmake.bat --- @ECHO OFF @REM @REM cwmake.bat - Make library of functions for reading and writing VAX format @REM data for Windows Win32 using Metrowerks CodeWarrior C (MWCC). @REM @REM Command Prompt command syntax: cwmake [ all | libvaxdata | clean ] @REM @REM @REM Author: Lawrence M. Baker @REM U.S. Geological Survey @REM 345 Middlefield Road MS977 @REM Menlo Park, CA 94025 @REM ba...@us... @REM @REM Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- @REM sion Routines, US Geological Survey, Open-File Report no. @REM 2005-XXX, nn p. @REM @REM @REM Disclaimer @REM @REM Although this program has been used by the USGS, no warranty, expressed or @REM implied, is made by the USGS or the United States Government as to the @REM accuracy and functioning of the program and related program material, nor @REM shall the fact of distribution constitute any such warranty, and no @REM responsibility is assumed by the USGS in connection therewith. @REM @REM @REM Modification History: @REM @REM 2-Sep-2005 L. M. Baker Original version (from LibVFBB.bat). @REM @SET LIB_NAME=LibVAXData @IF /I "%1" == "clean" GOTO :CLEAN @REM -cwd source (search source directory to resolve #includes) @REM -exceptions mw (enable synchronous exception handling) @REM -opt all (create fast code) -msext off (disable extensions) @SET CC=MWCC @SET CFLAGS=-cwd source -exceptions mw -opt all -msext off @ECHO ON @REM @REM VAX Data Conversion Routines (C linkage) @REM %CC% -c %CFLAGS% ..\src\from_vax_i2.c %CC% -c %CFLAGS% ..\src\from_vax_i4.c %CC% -c %CFLAGS% ..\src\from_vax_r4.c %CC% -c %CFLAGS% ..\src\from_vax_d8.c %CC% -c %CFLAGS% ..\src\from_vax_g8.c %CC% -c %CFLAGS% ..\src\from_vax_h16.c %CC% -c %CFLAGS% ..\src\to_vax_i2.c %CC% -c %CFLAGS% ..\src\to_vax_i4.c %CC% -c %CFLAGS% ..\src\to_vax_r4.c %CC% -c %CFLAGS% ..\src\to_vax_d8.c %CC% -c %CFLAGS% ..\src\to_vax_g8.c %CC% -c %CFLAGS% ..\src\to_vax_h16.c %CC% -c %CFLAGS% ..\src\is_little_endian.c @REM @REM Create a static library @REM LIB /nologo /out:%LIB_NAME%.lib ^ from_vax_i2.obj from_vax_i4.obj from_vax_r4.obj from_vax_d8.obj ^ from_vax_g8.obj from_vax_h16.obj to_vax_i2.obj to_vax_i4.obj ^ to_vax_r4.obj to_vax_d8.obj to_vax_g8.obj to_vax_h16.obj ^ is_little_endian.obj DEL from_vax_i2.obj from_vax_i4.obj from_vax_r4.obj from_vax_d8.obj ^ from_vax_g8.obj from_vax_h16.obj to_vax_i2.obj to_vax_i4.obj ^ to_vax_r4.obj to_vax_d8.obj to_vax_g8.obj to_vax_h16.obj ^ is_little_endian.obj @ECHO OFF @SET CFLAGS=%CFLAGS% -DUPCASE -DFORTRAN_LINKAGE=__stdcall @ECHO ON @REM @REM VAX Data Conversion Routines (Fortran linkage) @REM %CC% -c %CFLAGS% /FoFROM_VAX_I2@n.obj ..\src\from_vax_i2.c %CC% -c %CFLAGS% /FoFROM_VAX_I4@n.obj ..\src\from_vax_i4.c %CC% -c %CFLAGS% /FoFROM_VAX_R4@n.obj ..\src\from_vax_r4.c %CC% -c %CFLAGS% /FoFROM_VAX_D8@n.obj ..\src\from_vax_d8.c %CC% -c %CFLAGS% /FoFROM_VAX_G8@n.obj ..\src\from_vax_g8.c %CC% -c %CFLAGS% /FoFROM_VAX_H16@n.obj ..\src\from_vax_h16.c %CC% -c %CFLAGS% /FoTO_VAX_I2@n.obj ..\src\to_vax_i2.c %CC% -c %CFLAGS% /FoTO_VAX_I4@n.obj ..\src\to_vax_i4.c %CC% -c %CFLAGS% /FoTO_VAX_R4@n.obj ..\src\to_vax_r4.c %CC% -c %CFLAGS% /FoTO_VAX_D8@n.obj ..\src\to_vax_d8.c %CC% -c %CFLAGS% /FoTO_VAX_G8@n.obj ..\src\to_vax_g8.c %CC% -c %CFLAGS% /FoTO_VAX_H16@n.obj ..\src\to_vax_h16.c %CC% -c %CFLAGS% /FoIS_LITTLE_ENDIAN@n.obj ..\src\is_little_endian.c LIB /nologo %LIB_NAME%.lib ^ FROM_VAX_I2@n.obj FROM_VAX_I4@n.obj FROM_VAX_R4@n.obj ^ FROM_VAX_D8@n.obj FROM_VAX_G8@n.obj FROM_VAX_H16@n.obj ^ TO_VAX_I2@n.obj TO_VAX_I4@n.obj TO_VAX_R4@n.obj ^ TO_VAX_D8@n.obj TO_VAX_G8@n.obj TO_VAX_H16@n.obj ^ IS_LITTLE_ENDIAN@n.obj DEL FROM_VAX_I2@n.obj FROM_VAX_I4@n.obj FROM_VAX_R4@n.obj ^ FROM_VAX_D8@n.obj FROM_VAX_G8@n.obj FROM_VAX_H16@n.obj ^ TO_VAX_I2@n.obj TO_VAX_I4@n.obj TO_VAX_R4@n.obj ^ TO_VAX_D8@n.obj TO_VAX_G8@n.obj TO_VAX_H16@n.obj ^ IS_LITTLE_ENDIAN@n.obj @GOTO :EOF :CLEAN @ECHO ON DEL %LIB_NAME%.lib DEL from_vax_i2.obj from_vax_i4.obj from_vax_r4.obj from_vax_d8.obj ^ from_vax_g8.obj from_vax_h16.obj to_vax_i2.obj to_vax_i4.obj ^ to_vax_r4.obj to_vax_d8.obj to_vax_g8.obj to_vax_h16.obj ^ is_little_endian.obj DEL FROM_VAX_I2@n.obj FROM_VAX_I4@n.obj FROM_VAX_R4@n.obj ^ FROM_VAX_D8@n.obj FROM_VAX_G8@n.obj FROM_VAX_H16@n.obj ^ TO_VAX_I2@n.obj TO_VAX_I4@n.obj TO_VAX_R4@n.obj ^ TO_VAX_D8@n.obj TO_VAX_G8@n.obj TO_VAX_H16@n.obj ^ IS_LITTLE_ENDIAN@n.obj --- NEW FILE: readme --- Two DOS Batch scripts have been provided for Windows: cwmake.bat Metrowerks CodeWarrior C (MWCC) vcmake.bat Microsoft Visual C (CL) To create libvaxdata.o from here: For Metrowerks CodeWarrior: > "C:\Program Files\Metrowerks\CodeWarrior\Other Metrowerks Tools\ Command Line Tools\CWEnv.bat" [on a single line] > cwmake.bat [ all | libvaxdata | clean ] For Microsoft Visual C++: > "C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVars32.bat" > vcmake.bat [ all | libvaxdata | clean ] Substitute the correct path to set up the compiler command-line environment for your compiler. The default make target is all. The library and all object files will be written here. To link a C program with the library: For Metrowerks CodeWarrior: > MWLD program.obj path\libvaxdata.lib For Microsoft Visual C++: > LINK program.obj path\libvaxdata.lib substituting the path to the library for here (assuming it has not been moved or copied somewhere else). --- NEW FILE: vcmake.bat --- @ECHO OFF @REM @REM vcmake.bat - Make library of functions for reading and writing VAX format @REM data for Windows Win32 using Microsoft Visual C (CL). @REM @REM Command Prompt command syntax: vcmake [ all | libvaxdata | clean ] @REM @REM @REM Author: Lawrence M. Baker @REM U.S. Geological Survey @REM 345 Middlefield Road MS977 @REM Menlo Park, CA 94025 @REM ba...@us... @REM @REM Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- @REM sion Routines, US Geological Survey, Open-File Report no. @REM 2005-XXX, nn p. @REM @REM @REM Disclaimer @REM @REM Although this program has been used by the USGS, no warranty, expressed or @REM implied, is made by the USGS or the United States Government as to the @REM accuracy and functioning of the program and related program material, nor @REM shall the fact of distribution constitute any such warranty, and no @REM responsibility is assumed by the USGS in connection therewith. @REM @REM @REM Modification History: @REM @REM 2-Sep-2005 L. M. Baker Original version (from LibVFBB.bat). @REM @SET LIB_NAME=LibVAXData @IF /I "%1" == "clean" GOTO :CLEAN @REM /nologo (suppress display of sign-on banner) /ML (single threaded using @REM MSVCRTD.LIB) /W3 (warning level) /GX (enable synchronous exception @REM handling) /O2 (create fast code) /Za (disable extensions, i.e., ANSI C) @SET CC=CL @SET CFLAGS=/nologo /ML /W3 /GX /O2 /Za @ECHO ON @REM @REM VAX Data Conversion Routines (C linkage) @REM %CC% /c %CFLAGS% ..\src\from_vax_i2.c %CC% /c %CFLAGS% ..\src\from_vax_i4.c %CC% /c %CFLAGS% ..\src\from_vax_r4.c %CC% /c %CFLAGS% ..\src\from_vax_d8.c %CC% /c %CFLAGS% ..\src\from_vax_g8.c %CC% /c %CFLAGS% ..\src\from_vax_h16.c %CC% /c %CFLAGS% ..\src\to_vax_i2.c %CC% /c %CFLAGS% ..\src\to_vax_i4.c %CC% /c %CFLAGS% ..\src\to_vax_r4.c %CC% /c %CFLAGS% ..\src\to_vax_d8.c %CC% /c %CFLAGS% ..\src\to_vax_g8.c %CC% /c %CFLAGS% ..\src\to_vax_h16.c %CC% /c %CFLAGS% ..\src\is_little_endian.c @REM @REM Create a static library @REM LIB /nologo /out:%LIB_NAME%.lib ^ from_vax_i2.obj from_vax_i4.obj from_vax_r4.obj from_vax_d8.obj ^ from_vax_g8.obj from_vax_h16.obj to_vax_i2.obj to_vax_i4.obj ^ to_vax_r4.obj to_vax_d8.obj to_vax_g8.obj to_vax_h16.obj ^ is_little_endian.obj DEL from_vax_i2.obj from_vax_i4.obj from_vax_r4.obj from_vax_d8.obj ^ from_vax_g8.obj from_vax_h16.obj to_vax_i2.obj to_vax_i4.obj ^ to_vax_r4.obj to_vax_d8.obj to_vax_g8.obj to_vax_h16.obj ^ is_little_endian.obj @ECHO OFF @SET CFLAGS=%CFLAGS% /DUPCASE /DFORTRAN_LINKAGE=__stdcall @ECHO ON @REM @REM VAX Data Conversion Routines (Fortran linkage) @REM %CC% /c %CFLAGS% /FoFROM_VAX_I2@n.obj ..\src\from_vax_i2.c %CC% /c %CFLAGS% /FoFROM_VAX_I4@n.obj ..\src\from_vax_i4.c %CC% /c %CFLAGS% /FoFROM_VAX_R4@n.obj ..\src\from_vax_r4.c %CC% /c %CFLAGS% /FoFROM_VAX_D8@n.obj ..\src\from_vax_d8.c %CC% /c %CFLAGS% /FoFROM_VAX_G8@n.obj ..\src\from_vax_g8.c %CC% /c %CFLAGS% /FoFROM_VAX_H16@n.obj ..\src\from_vax_h16.c %CC% /c %CFLAGS% /FoTO_VAX_I2@n.obj ..\src\to_vax_i2.c %CC% /c %CFLAGS% /FoTO_VAX_I4@n.obj ..\src\to_vax_i4.c %CC% /c %CFLAGS% /FoTO_VAX_R4@n.obj ..\src\to_vax_r4.c %CC% /c %CFLAGS% /FoTO_VAX_D8@n.obj ..\src\to_vax_d8.c %CC% /c %CFLAGS% /FoTO_VAX_G8@n.obj ..\src\to_vax_g8.c %CC% /c %CFLAGS% /FoTO_VAX_H16@n.obj ..\src\to_vax_h16.c %CC% /c %CFLAGS% /FoIS_LITTLE_ENDIAN@n.obj ..\src\is_little_endian.c LIB /nologo %LIB_NAME%.lib ^ FROM_VAX_I2@n.obj FROM_VAX_I4@n.obj FROM_VAX_R4@n.obj ^ FROM_VAX_D8@n.obj FROM_VAX_G8@n.obj FROM_VAX_H16@n.obj ^ TO_VAX_I2@n.obj TO_VAX_I4@n.obj TO_VAX_R4@n.obj ^ TO_VAX_D8@n.obj TO_VAX_G8@n.obj TO_VAX_H16@n.obj ^ IS_LITTLE_ENDIAN@n.obj DEL FROM_VAX_I2@n.obj FROM_VAX_I4@n.obj FROM_VAX_R4@n.obj ^ FROM_VAX_D8@n.obj FROM_VAX_G8@n.obj FROM_VAX_H16@n.obj ^ TO_VAX_I2@n.obj TO_VAX_I4@n.obj TO_VAX_R4@n.obj ^ TO_VAX_D8@n.obj TO_VAX_G8@n.obj TO_VAX_H16@n.obj ^ IS_LITTLE_ENDIAN@n.obj @GOTO :EOF :CLEAN @ECHO ON DEL %LIB_NAME%.lib DEL from_vax_i2.obj from_vax_i4.obj from_vax_r4.obj from_vax_d8.obj ^ from_vax_g8.obj from_vax_h16.obj to_vax_i2.obj to_vax_i4.obj ^ to_vax_r4.obj to_vax_d8.obj to_vax_g8.obj to_vax_h16.obj ^ is_little_endian.obj DEL FROM_VAX_I2@n.obj FROM_VAX_I4@n.obj FROM_VAX_R4@n.obj ^ FROM_VAX_D8@n.obj FROM_VAX_G8@n.obj FROM_VAX_H16@n.obj ^ TO_VAX_I2@n.obj TO_VAX_I4@n.obj TO_VAX_R4@n.obj ^ TO_VAX_D8@n.obj TO_VAX_G8@n.obj TO_VAX_H16@n.obj ^ IS_LITTLE_ENDIAN@n.obj |
From: Patrick C. <pa...@us...> - 2005-10-25 07:32:23
|
Update of /cvsroot/linux-decnet/dnprogs/libvaxdata/tru64 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7174/tru64 Added Files: makefile.cc makefile.gcc makefile.osf1 readme Log Message: Add in libvaxdata --- NEW FILE: makefile.cc --- # # makefile.cc - Make library of functions for reading and writing VAX format # data for Tru64 UNIX using DEC/Compaq/HP C (cc). # # Shell command syntax: make -f makefile.cc [ all | libvaxdata | clean ] # # -fast (optimize for speed) -std1 (strict ANSI) CC = cc CFLAGS = -fast -std1 include makefile.osf1 --- NEW FILE: makefile.gcc --- # # makefile.gcc - Make library of functions for reading and writing VAX format # data for Tru64 UNIX using GNU C (gcc). # # Shell command syntax: make -f makefile.gcc [ all | libvaxdata | clean ] # # -O3 (highest level of optimization) -ansi (strict ANSI) CC = gcc CFLAGS = -O3 -ansi include makefile.osf1 --- NEW FILE: makefile.osf1 --- ################################################################################ # # # makefile.osf1 - Make library of functions for reading and writing VAX format # # data for Tru64 Unix. # # # # Shell command syntax: make -f makefile.osf1 \ # # [ CC="c_compiler" ] \ # # [ CFLAGS="c_compiler_flags" ] \ # # [ all | libvaxdata | clean ] # # # # # # Author: Lawrence M. Baker # # U.S. Geological Survey # # 345 Middlefield Road MS977 # # Menlo Park, CA 94025 # # ba...@us... # # # # Citation: Baker, Lawrence M., 2005, libvaxdata: VAX Data Format Conver- # # sion Routines, US Geological Survey, Open-File Report no. # # 2005-XXX, nn p. # # # # # # Disclaimer # # # # Although this program has been used by the USGS, no warranty, expressed or # # implied, is made by the USGS or the United States Government as to the # # accuracy and functioning of the program and related program material, nor # # shall the fact of distribution constitute any such warranty, and no # # responsibility is assumed by the USGS in connection therewith. # # # # # # Modification History: # # # # 2-Sep-2005 L. M. Baker Original version (from make.libvfbb). # # 12-Oct-2005 L. M. Baker Use custom compile rule for is_little_endian. # # # ################################################################################ # GNU C # -O3 (highest level of optimization) -ansi (strict ANSI) #CC = gcc #CFLAGS = -O3 -ansi # DEC/Compaq/HP C # -fast (optimize for speed) -std1 (strict ANSI) #CC = cc #CFLAGS = -fast -std1 # alpha on DEC/Compaq/HP Alpha ARCH = `uname -p` LIB_NAME = libvaxdata OBJS = from_vax_i2.o from_vax_i2_.o from_vax_i4.o \ from_vax_i4_.o from_vax_r4.o from_vax_r4_.o \ from_vax_d8.o from_vax_d8_.o from_vax_g8.o \ from_vax_g8_.o from_vax_h16.o from_vax_h16_.o \ to_vax_i2.o to_vax_i2_.o to_vax_i4.o \ to_vax_i4_.o to_vax_r4.o to_vax_r4_.o \ to_vax_d8.o to_vax_d8_.o to_vax_g8.o \ to_vax_g8_.o to_vax_h16.o to_vax_h16_.o \ is_little_endian.o is_little_endian_.o VPATH = ../../src all: $(LIB_NAME) $(LIB_NAME): test -d $(ARCH) || mkdir $(ARCH) cd $(ARCH) ; $(MAKE) -f ../makefile.osf1 \ CC="$(CC)" \ CFLAGS="$(CFLAGS)" \ $(LIB_NAME).a cd $(ARCH) ; $(RM) $(OBJS) $(LIB_NAME).a: $(OBJS) ar -r -c $(LIB_NAME).a $(OBJS) ranlib $(LIB_NAME).a is_little_endian.o: $(CC) -c -o $@ $? is_little_endian_.o: $(CC) -c -o $@ $? clean: cd $(ARCH) ; $(RM) -f $(LIB_NAME).a $(OBJS) --- NEW FILE: readme --- Two makefiles have been provided for Tru64 Unix: makefile.gcc GNU C (gcc) makefile.cc DEC/Compaq/HP C (cc) To create libvaxdata.a from here: # make -f makefile.xxx [ all | libvaxdata | clean ] substituting gcc or cc for xxx. The default make target is all. The library and all object files will be written to a subdirectory named for the system architecture returned by "uname -p". To link a C program with the library: # xxx -o program program.o -lvaxdata -Lhere/arch substituting gcc or cc for xxx, and the path to the library for here/arch (assuming it has not been moved or copied somewhere else). To link a Fortran program with the library, substitute g77 or f77 (f90, f95) for xxx, plus the path to the library for here/arch. |