microp@b-tech.UUCP (Microport mailing list) (09/21/87)
Subject: Microp mailing list #33 (18-SEP-87) This message is being mailed to you as part of a mailing list. This list is targeted towards technical discussions of Microport's Sys V/AT Unix for the IBM PC-AT. It not officially related to Microport Systems Inc. Any input you have should be sent to: seismo!umix!b-tech!microp microp%b-tech.uucp@umix.cc.umich.edu To be added to this list, contact one of the following sites: seismo!scubed!sdcsvax!amos.ling.LOCAL!sdeggo!dave (southern CA area) tektronix!reed!percival!nerd rutgers!umnd-cs!umn-cs!rosevax!herman!k0jfv!alan (Minneapolis/St. Paul area) uunet!mcvax!trevan!trevor (UK) nessus!info-uport genrad!mrst!sdti!mjy gargoyle.uchicago.edu!vijit!madsen ------------------------------------------------------------------------- From: umix!CAF.MIT.EDU!soft21.UUCP!root Subject: Soundex.c /* ===================================================================== */ /* SOUNDEX --- Translate name into Soundex(R) code */ /* */ /* The code below implements the Soundex algorithm as described in Vol 3 */ /* of Donald Knuth's "Art of Computer Programming" Pge. 392 */ /* Coded by John Antypas ...!pyramid!soft21!root 1987 */ /* */ /* DESCRIPTION: */ /* char *soundex(key) */ /* char *key; */ /* */ /* Given character string pointed to by key, returns pointer to static */ /* string (which must be copied) containing Soundex code. */ /* ===================================================================== */ # include <ctype.h> char *soundex(key) char *key; { char t1[80], t2[80], *p1, *p2, c; extern strlen(), strcpy(), strncpy(), strcat(); p1 = key; /* p1 = pointer to origional string */ p2 = t1; /* p2 = pointer in static area */ /* First convert to upper case so we can handle it */ while (*p1 != '\0') { if (isalpha(*p1)) { *p2++ = toupper(*p1); }; p1++; }; p1 = t1; p2 = t2; *p2++ = *p1++; /* Remove repeated characters */ c = '\0'; while (*p1 != '\0') { if (*p1 != c) { *p2++ = *p1; c = *p1; }; p1 ++; }; *p2 = '\0'; /* Save first letter and remove forbidden characters */ p1 = t2; p2 = t1; *p1 ++ = *p2 ++; while (*p1 != '\0') { switch(*p1) { case 'A' : case 'E' : case 'H' : case 'I' : case 'O' : case 'U' : case 'W' : case 'Y' : break; default : { *p2++ = *p1; }; }; p1++; }; *p2 = '\0'; /* Convert string to Soundex numbers */ p1 = t1; p1 ++; while (*p1 != '\0') { switch(*p1) { case 'B' : case 'F' : case 'P' : case 'V' : { *p1 = '1'; break; }; case 'C' : case 'G' : case 'J' : case 'K' : case 'Q' : case 'S' : case 'X' : case 'Z' : { *p1 = '2'; break; }; case 'D' : case 'T' : { *p1 = '3'; break; }; case 'L' : { *p1 = '4'; break; }; case 'M' : case 'N' : { *p1 = '5'; break; }; case 'R' : { *p1 = '6'; break; }; }; p1 ++; }; /* Now make sure it's of the form LXXXX where X is a digit or 0 */ if (strlen(t1) > 5) { t1[5] = '\0'; }; if (strlen(t1) == 5) { strcpy(t2, t1); }; while (strlen(t1) < 5) { strcat(t1, "0"); }; strcpy(t2, t1); return(t2); } ----------------------------------------------------------------------------- From: umix!seismo!ihnp4!sfmin!lmg Subject: accessing DOS partitions Many many months ago I submitted the following bug report to Microport (on paper): ========================================================================= doscat(1), doscp(1) do not work with DOS partitions on fixed disk. System is a Compaq Deskpro 386. Partition 1 is DOS, partition 2 is System5. /dev/rdsk/0s6 is linked to /dev/dos/C. NOTE: This is not 0s5, the "DOS partition". Approximately the first 2048 bytes of files are successfully displayed or copied from DOS to UNIX. The rest is missing or consists of garbage. This happens with both text and binary files, even with proper use of the "-b" option. The problem occurs under 1.3.6, and under 1.38.7B. There is no corresponding problem with DOS floppies. ========================================================================= I was contacted (by phone) by someone in tech support, who took down the details. He said that the problem may be with the format of the FAT on Compaq machines. He promised to look into it and get back to me. So far, I have heard nothing further on this. Microport never got back to me. I didn't upgrade to 2.2 because I'm waiting around for the 386 release and wondering, "Did they fix this yet?" Does anyone know? Larry Geary ihnp4!attunix!lmg ----------------------------------------------------------------------------- From: umix!seismo!scubed!sdcsvax!ucrmath!soft21!root Subject: errmsg.h The file below is used instead of errno.h and provides a textual error message array like Berkeley. Nothing fancy, but at least I don't have to look up the errno codes all the time. /* * Error codes */ # include "errno.h" static char *errmsg[47] = { "No errors", "Not super-user", "No such file or directory", "No such process", "Interrupted system call", "I/O error", "No such device or address", "Arg list too long", "Exec format error", "Bad file number", "No children", "No more processes", "Not enough core", "Permission denied", "Bad address", "Block device required", "Mount device busy", "File exists", "Cross-device link", "No such device", "Not a directory", "Is a directory", "Invalid argument", "File table overflow", "Too many open files", "Not a typewriter", "Text file busy", "File too large", "No space left on device", "Illegal seek", "Read only file system", "Too many links", "Broken pipe", "Math arg out of domain of func", "Math result not representable", "No message of desired type", "Identifier removed", "Channel number out of range", "Level 2 not synchronized", "Level 3 halted", "Level 3 reset", "Link number out of range", "Protocol driver not attached", "No CSI structure available", "Level 2 halted", "Deadlock condition", "No record locks available." }; ----------------------------------------------------------------------------- From: umix!seismo!cmcl2!manhat!samperi Date: Sun, 30 Aug 87 18:25:28 EDT Subject: uport mailing list & dbackup Dominick Samperi Manhattan College Dept. of Math & Computer Science Riverdale, NY 10471 ...!seismo!cmcl2!manhat!samperi I've included some software below that might be useful to Microport users. It is a backup/restore package that uses cpio and find. An MS-DOS compatible version of this program will be available shortly. To extract the program, first uudecode this message, which will generate dbackup.shr.Z, then uncompress this file and shell the resulting archive. I'm sending it directly to you because I was afraid that sending it to microp might have resulted in it being forwarded to many users who would not really be interested. [ed: due to size constraints, the program is available from the author] ----------------------------------------------------------------------------- From: Nick Zentena <umix!RELAY.CS.NET!gpu.utcs.toronto.edu!zen> Subject: Microport system V I was also interested in how particular Microport's system V is when running on non-IBM equipment. I thinking of putting together a system with the primary motivation being running system V. I'd like to know what to look out for(i.e. any know problems with clone equipment)? --------------------------------------------------------------------------- From: umich!eecs.umich.edu!umich!eecs.umich.edu!msudoc!ihnp4!meccts!bright!dab Subject: Bug in 2.2 curses... I recently came upon a very strange bug in System V/AT 2.2 curses; does anyone know if it has been fixed? It seems that when keypad mode is on, a getch() will return a (binary) 0 when the capital P is typed. No other character appears to be affected and it only occurs when keypad mode is on; everything works if keypad is off (except, of course, the function keys, which is why I turned on keypad mode to begin with!). Has anyone else been bitten by this bug? Also, the F10 key does not seem to be recognized, although it is sending, as near as I can tell, exactly the characters I have defined in the "ansi" termdef (a slightly modified version from that distributed with 2.2, since Microport set all function keys to sending the same key sequence in the termdef, which they don't using the distributed /etc/rc.d/keybrd.rc (not that you would want them to!). How about this one? By the way, is this mailing list still active? It's been a long time since I received anything from it (I know, that is kind of like asking "Are you asleep?). Thanks. David A. Bright ...!meccts!bright!dab dbright@swde.ETA.COM -------------------------------------------------------------------------- Date: Wed, 16 Sep 87 10:26:33 EST Subject: File system analyzer From: umix!rutgers!husc6!panda!genrad!mjy After noticing that my system performance was degrading somewhat recently, I realized that I had no means of determining just how badly fragmented my file systems were. So I wrote a quick-and-dirty utility, fsanalyze, that scans a file system looking for fragmentation and other inefficiencies. Below is a sample of its output: Analyzing file system /dev/dsk/0s2... File system block size = 1024 bytes Volume Size = 26778 blocks (27420672 bytes) 336 blocks reserved for super block and inodes 26442 blocks reserved for data Total inodes = 5344 72.81% inodes used (3891 used, 1453 free) 85.79% data blocks used (22679 used, 3756 free) 468 directories 1259 multiply-linked files Fragmentation = 21.92% Indirects = 367 (9.43%) Double indirects = 4 (0.10%) Triple indirects = 0 (0.00%) Oversized directories = 0 (0.00%) (Note that this file system, which I use for storing USENET news articles, is small, full, and fragmented!) I've found it useful, so I thought someone else might too. I'd be glad to mail the source to anyone who's interested. -- Mike Young | UUCP: ...{genrad,necis}!mrst!sdti!mjy Software Development Technologies, Inc | Tel : (617) 443-5779 Sudbury Massachusetts [ed: sounds useful. I'm waiting for the day when someone will write a low cost *in place* file system optimizer. DOS has them, why can't unix. ] ------------------------------------------------------------------------------ Subject: ELM 1.7 From: b-tech!zeeff Has anyone made the modifications necessary to get ELM 1.7 working under Microport? Please send diff's if you have. Also, does anyone know of TCP/IP support for Microport Unix? --Jon