Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!portal!cup.portal.com!thad From: thad@cup.portal.com (Thad P Floryan) Newsgroups: comp.sys.amiga Subject: Re: pbmplus on abcfd20 TOO LARGE!!! Message-ID: <36649@cup.portal.com> Date: 7 Dec 90 12:06:24 GMT References: <1990Nov17.033236.7805@nas.nasa.gov> <36025@cup.portal.com> <1990Nov24.054412.22675@nas.nasa.gov> <36267@cup.portal.com> <3907@corpane.UUCP> Organization: The Portal System (TM) Lines: 228 sparks@corpane.UUCP (John Sparks) in <3907@corpane.UUCP> writes: >thad@cup.portal.com (Thad P Floryan) writes: >> ... So, in order to transfer the files >> from work to home, I ftp them directly onto a Grid portable (Messy-DOS >> laptop), the take the floppy home and transfer them to my Amy with >> Cross-Dos. ... > >>Why not de-lharc them on the work system? Do you REALLY have an MS-DOS syste m > >I do basically the same thing to get files to my Amiga, Thad. >The reason you don't un-archive them at work is that MSDOS >(which is what you have to transfer them to your amiga with) >doesn't support full amiga file names (Only 8 characters with >a 3 letter extention). > >If he had lharc on his unix machine he could possibly unlharc large files >on it then re-lharc them into smaller lharc files. IF his unix machine >supports filenames long enough. My unix machine here chokes on file names >longer than 14 characters. So, I can't lhunarc them on my unix machine, >as it truncates names over 14 chars long. And a lot of Amiga file names seem >to be more than 14 chars. Thanks for the clarification for WHY the problem. Here's another solution which I implemented for one of our users' groups, based on what I'd seen at Ohio State (by Bob Sutterfield and Karl Kleinpaste) regarding uucp access to their system (osu-cis): break up large files into, say, 100K sections for uucp or modem (or floppy disk) transfer, then either: Amiga: CLI> join parta partb partc ... AS everything.lzh UNIX: $ cat part* > everything.lzh The convention at osu-cis follows what my program (docs are below) does; the program works on UNIX (all flavors) and on the Amiga. I was quite tempted to just post the sources, too, ... , foo, it's so small (less than some of my recent postings :-) so maybe this quick-hack can help someone else, too. 'Sfunny how some of these one-time-only qwik-'n-dirty programs end up being used almost in a production situation! Not the best code, but it works. Enjoy. Thad Floryan [ thad@cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ] ---- Cut Here and unpack ---- #!/bin/sh # This is a shell archive (shar 3.32) # made 12/07/1990 11:58 UTC by thad@thadlabs # Source directory /u/thad/xfr-amiga # # existing files WILL be overwritten # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 124 -rw-r--r-- Makefile # 2627 -rw-r--r-- xsplit.c # if touch 2>&1 | fgrep 'amc' > /dev/null then TOUCH=touch else TOUCH=true fi # ============= Makefile ============== echo "x - extracting Makefile (Text)" sed 's/^X//' << 'SHAR_EOF' > Makefile && X# Makefile for xsplit, Manx version (3.6a) X Xxsplit: xsplit.o X ln -M +Q xsplit -lc X Xxsplit.o: xsplit.c X cc -DAMIGA xsplit SHAR_EOF $TOUCH -am 1207035790 Makefile && chmod 0644 Makefile || echo "restore of Makefile failed" set `wc -c Makefile`;Wc_c=$1 if test "$Wc_c" != "124"; then echo original size 124, current size $Wc_c fi # ============= xsplit.c ============== echo "x - extracting xsplit.c (Text)" sed 's/^X//' << 'SHAR_EOF' > xsplit.c && X/* X S P L I T X * X * X * PURPOSE: X * X * Breaks up a large archive (e.g. foo.tar.Z) into multiple 100,000 byte X * files for file transfer sanity in case an FTP, uucp, XMODEM, etc. fails. X * X * Each created file's name consists of a given prefix to which will be X * appended a two-character suffix per "aa", "ab", ... , "zz". X * X * USAGE: X * X * xsplit source.file prefix X * X * where: X * "source.file" is the single large file to be split X * X * "prefix" is the first part of the names of the files to be X * created by the split. X * X * EXAMPLES: X * X * xsplit foo.1.00.tar.Z xfr- X * xsplit foo.1.00.tar.Z "xfr-" X * X * either of the above will create xfr-aa, xfr-ab, ... , xfr-zz X * X * IDEAS FOR FUTURE DEVELOPMENT: X * X * - add optional switch value ( -n ) to be the explicit byte size of each X * created file; convert value via -atol(argv[x]) to replace the X * constant use of 100000 in the present program. X * X * HISTORY: X * X * Version 1.0, 6-May-1989, as a quick hack by Thad Floryan. X * X * BUILDING: X * X * Procedures for Manx 3.6a on the Amiga: X * X * cc -DAMIGA xsplit X * ln -M +Q xsplit -lc X * X * Procedure for UNIXPC/3B1/AT&T-7300, HP-UX, etc.: X * X * cc -O xsplit.c -o xsplit -s X */ X X#include X Xstatic char *version = "xsplit 1.0 (6-May-1989) Thad Floryan"; X Xvoid exit(); Xvoid fclose(); Xint fgetc(); XFILE *fopen(); Xvoid fputc(); Xvoid fprintf(); Xvoid sprintf(); X X#ifdef AMIGA X#define ERRRET 20 X#else X#define ERRRET 1 X#endif X Xmain(argc,argv) X int argc; X char *argv[]; X{ X int fbyte; X int filnum = 0; X FILE *input; X char oname[80]; X FILE *output; X long wrtcnt = 0; X X if (argc != 3) X { X fprintf(stderr,"%s\nusage: %s source.file prefix\n", X version, argv[0]); X exit(ERRRET); X } X X if ((input = fopen(argv[1], "r")) == NULL) X { X fprintf(stderr, "?%s: Cannot open %s for input\n", argv[0], argv[1]); X exit(ERRRET); X } X X while ((fbyte = fgetc(input)) != EOF) X { X if (wrtcnt == 0) X { X sprintf(oname,"%s%c%c", argv[2], X (char) ('a' + (filnum / 26)), X (char) ('a' + (filnum % 26))); X X if ((output = fopen(oname, "w")) == NULL) X { X fprintf(stderr,"?%s: Cannot open %s for output\n", X argv[0], oname); X exit(ERRRET); X } X } X X fputc((char)fbyte, output); X X ++wrtcnt; X X if (wrtcnt == 100000) X { X fclose(output); X X wrtcnt = 0; X X ++filnum; X } X } X X fclose(input); X X if (wrtcnt > 0) X { X fclose(output); X } X} X X#ifdef AMIGA X/* X * stub to prevent linking the library routine of the same X * name since we don't run from the Workbench X */ X_wb_parse(){} X#endif SHAR_EOF $TOUCH -am 1207035790 xsplit.c && chmod 0644 xsplit.c || echo "restore of xsplit.c failed" set `wc -c xsplit.c`;Wc_c=$1 if test "$Wc_c" != "2627"; then echo original size 2627, current size $Wc_c fi exit 0