home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / UUPC11XS.ZIP / UUCP / UUCP.C next >
C/C++ Source or Header  |  1992-12-11  |  26KB  |  627 lines

  1. /*--------------------------------------------------------------------*/
  2. /*    u u c p . c                                                     */
  3. /*                                                                    */
  4. /*    UUCP lookalike for IBM PC.                                      */
  5. /*--------------------------------------------------------------------*/
  6.  
  7. /*--------------------------------------------------------------------*/
  8. /*    Changes Copyright (c) 1989 by Andrew H. Derbyshire.             */
  9. /*                                                                    */
  10. /*    Changes Copyright (c) 1990-1992 by Kendra Electronic            */
  11. /*    Wonderworks.                                                    */
  12. /*                                                                    */
  13. /*    All rights reserved except those explicitly granted by the      */
  14. /*    UUPC/extended license agreement.                                */
  15. /*--------------------------------------------------------------------*/
  16.  
  17. /*--------------------------------------------------------------------*/
  18. /*                          RCS Information                           */
  19. /*--------------------------------------------------------------------*/
  20.  
  21. /*
  22.  *    $Id: UUCP.C 1.2 1992/12/11 12:45:11 ahd Exp $
  23.  *
  24.  *    Revision history:
  25.  *    $Log: UUCP.C $
  26.  * Revision 1.2  1992/12/11  12:45:11  ahd
  27.  * Normalize paths for files read
  28.  *
  29.  */
  30.  
  31. /*--------------------------------------------------------------------*/
  32. /*                                                                    */
  33. /*    Change history:                                                 */
  34. /*                                                                    */
  35. /*       02/08/81 H.A.E.Broomhall                                     */
  36. /*                Hacked for UUPC/extended 1.09c                      */
  37. /*       04/27/91 Drew Derbyshire                                     */
  38. /*                Modified for UUPC/extended 1.10a                    */
  39. /*       09/26/91 Mitch Mitchell                                      */
  40. /*                Support for UUX                                     */
  41. /*       01/26/92 Drew Derbyshire                                     */
  42. /*                Various comment and error message clean up          */
  43. /*--------------------------------------------------------------------*/
  44.  
  45. /*--------------------------------------------------------------------*/
  46. /*                        system include files                        */
  47. /*--------------------------------------------------------------------*/
  48.  
  49. #include  <ctype.h>
  50. #include  <direct.h>
  51. #include  <fcntl.h>
  52. #include  <io.h>
  53. #include  <stdio.h>
  54. #include  <stdlib.h>
  55. #include  <string.h>
  56. #include  <sys/types.h>
  57. #include  <sys/stat.h>
  58.  
  59. /*--------------------------------------------------------------------*/
  60. /*                    UUPC/extended include files                     */
  61. /*--------------------------------------------------------------------*/
  62.  
  63. #include  "lib.h"
  64. #include  "expath.h"
  65. #include  "getopt.h"
  66. #include  "getseq.h"
  67. #include  "hlib.h"
  68. #include  "hostable.h"
  69. #include  "import.h"
  70. #include  "ndir.h"
  71. #include  "security.h"
  72. #include  "timestmp.h"
  73.  
  74. /*--------------------------------------------------------------------*/
  75. /*                          Global variables                          */
  76. /*--------------------------------------------------------------------*/
  77.  
  78. static boolean       spool_flag = FALSE;
  79. static char          spool_file[FILENAME_MAX]; /* alt spool file name */
  80. static boolean       dir_flag = TRUE;
  81. static boolean       xeqt_flag = TRUE;    /* Triggered by -r option */
  82. static char          grade = 'n';         /* Default grade of service */
  83. static boolean       mail_me = FALSE;     /* changes with -m */
  84. static boolean       mail_them = FALSE;   /* changes with -n */
  85. static char  remote_user[10];             /* user to mail with -n */
  86. static char  *destn_file;
  87. static char  flags[16];
  88.  
  89. currentfile();
  90.  
  91. /*--------------------------------------------------------------------*/
  92. /*    u s a g e                                                       */
  93. /*                                                                    */
  94. /*    Report flags used by program                                    */
  95. /*--------------------------------------------------------------------*/
  96.  
  97. static         void    usage(void)
  98. {
  99.       fprintf(stderr, "Usage: uucp\t[-c|-C] [-d|-f] [-gGRADE] [-j] [-m] [-nUSER] [-r] [-sFILE]\\\n\
  100. \t\t[-xDEBUG_LEVEL] source-files destination-file\n");
  101. }
  102.  
  103. /*--------------------------------------------------------------------*/
  104. /*    c p                                                             */
  105. /*                                                                    */
  106. /*    Copy a file                                                     */
  107. /*--------------------------------------------------------------------*/
  108.  
  109. static int cp(char *from, char *to)
  110. {
  111.       int         fd_from, fd_to;
  112.       int         nr, nw = -1;
  113.       char        buf[BUFSIZ*4]; /* faster if we alloc a big buffer */
  114.  
  115.       if ((fd_from = open(from, O_RDONLY | O_BINARY)) == -1)
  116.          return(1);        /* failed */
  117.       /* what if the to is a directory? */
  118.       /* possible with local source & dest uucp */
  119.       if ((fd_to = open(to, O_CREAT | O_BINARY | O_WRONLY, S_IWRITE | S_IREAD)) == -1) {
  120.          close(fd_from);
  121.          return(1);        /* failed */
  122.          /* NOTE - this assumes all the required directories exist!  */
  123.       }
  124.       while  ((nr = read(fd_from, buf, sizeof buf)) > 0 &&
  125.          (nw = write(fd_to, buf, nr)) == nr)
  126.          ;
  127.       close(fd_to);
  128.       close(fd_from);
  129.       if (nr != 0 || nw == -1)
  130.          return(1);        /* failed in copy */
  131.       return(0);
  132. } /* cp */
  133.  
  134. /*--------------------------------------------------------------------*/
  135. /*    s p l i t _ p a t h                                             */
  136. /*                                                                    */
  137. /*    split_path splits a path into 3 components.                     */
  138. /*    1)  The system next in line                                     */
  139. /*    2)  Any intermediate systems as a bang path                     */
  140. /*    3)  The actual file name/path                                   */
  141. /*                                                                    */
  142. /*    It tries to be a little clever with idiots, in recognizing      */
  143. /*    system=this machine                                             */
  144. /*--------------------------------------------------------------------*/
  145.  
  146. static         void    split_path(char *path,
  147.                                   char *system,
  148.                                   char *inter,
  149.                                   char *file)
  150. {
  151.       char    *p_left, *p_right, *p;
  152.  
  153.       *system = *inter = *file = '\0';    /* init to nothing */
  154.       for (p = path;; p = p_left + 1)  {
  155.          p_left = strchr(p, '!');         /* look for the first bang */
  156.          if (p_left == NULL)  {           /* not a remote path */
  157.             strcpy(file, p);              /* so just return filename */
  158.             return;
  159.          }
  160.          /* now check if the system was in fact us.
  161.        If so strip it and restart */
  162.          if (equaln(E_nodename, p, p_left - p) &&
  163.             (E_nodename[p_left - p] == '\0'))
  164.             continue;
  165.  
  166.          p_right = strrchr(p, '!');      /* look for the last bang */
  167.          strcpy(file, p_right + 1);      /* and thats our filename */
  168.          strncpy(system, p, p_left - p); /* and we have a system thats not us */
  169.          system[p_left - p] = '\0';
  170.          /* now see if there is an intermediate path */
  171.          if (p_left != p_right)  {        /* yup - there is */
  172.             strncpy(inter, p_left + 1, p_right - p_left - 1);
  173.             inter[p_right - p_left - 1] = '\0';
  174.          }
  175.          return;                 /* and we're done */
  176.       }        /* never get here :-)  */
  177. }
  178.  
  179. /*--------------------------------------------------------------------*/
  180. /*    d o _ u u x                                                     */
  181. /*                                                                    */
  182. /*    Generate & execute UUX command                                  */
  183. /*--------------------------------------------------------------------*/
  184.  
  185. int   do_uux(char *remote,
  186.              char *src_syst,
  187.              char *src_file,
  188.              char *dest_syst,
  189.              char *dest_inter,
  190.              char *dest_file)
  191. {
  192.       char        xcmd[BUFSIZ];        /* buffer for assembling the UUX command */
  193.       char        *ex_flg;
  194.  
  195. /*--------------------------------------------------------------------*/
  196. /*                 First - lets get the basic command                 */
  197. /*--------------------------------------------------------------------*/
  198.  
  199.       ex_flg = xeqt_flag ? "" : "-r";
  200.       sprintf(xcmd, "uux -C %s %s!uucp -C ", ex_flg, remote);
  201.                               /* but what about mailing the guy? */
  202.  
  203. /*--------------------------------------------------------------------*/
  204. /*                  Now we sort out the source name                   */
  205. /*--------------------------------------------------------------------*/
  206.  
  207.       if ((*src_syst == '\0') || equal(src_syst, E_nodename))
  208.          sprintf(xcmd + strlen(xcmd), " \\!%s ", src_file);
  209.       else  {
  210.          if (!equal(remote, src_syst))
  211.             sprintf(xcmd + strlen(xcmd), " (%s!%s) ", src_syst, src_file);
  212.          else
  213.             sprintf(xcmd + strlen(xcmd), " (%s) ", src_file);
  214.       } /* else */
  215.  
  216. /*--------------------------------------------------------------------*/
  217. /*                   Now to do the destination name                   */
  218. /*--------------------------------------------------------------------*/
  219.  
  220.       if (*dest_inter != '\0')  {
  221.          if (*dest_syst != '\0')
  222.             sprintf(xcmd + strlen(xcmd), " (%s!%s!%s) ", dest_syst, dest_inter, dest_file);
  223.          else
  224.             sprintf(xcmd + strlen(xcmd), " (%s!%s) ", dest_inter, dest_file);
  225.       }
  226.       else  {
  227.          if ((*dest_syst == '\0') || equal(dest_syst, E_nodename))
  228.             sprintf(xcmd + strlen(xcmd), " (%s!%s) ", E_nodename, dest_file);
  229.       }
  230.       printmsg(2, "xcmd: %s", xcmd);
  231.  
  232. /*--------------------------------------------------------------------*/
  233. /*                              OK - GO!                              */
  234. /*--------------------------------------------------------------------*/
  235.  
  236.       system(xcmd);
  237.       return(1);
  238.  
  239. } /* do_uux */
  240.  
  241. /*--------------------------------------------------------------------*/
  242. /*    d o _ c o p y                                                   */
  243. /*                                                                    */
  244. /*    At this point only one of the systems can be remote and only    */
  245. /*    1 hop away.  All the rest have been filtered out                */
  246. /*--------------------------------------------------------------------*/
  247.  
  248. int   do_copy(char *src_syst,
  249.               char *src_file,
  250.               char *dest_syst,
  251.               char *dest_file)
  252. {
  253.       char        *p;
  254.       boolean wild_flag = FALSE;
  255.       boolean write_flag;
  256.       char        tmfile[15];       /* Unix style name for c file */
  257.       char        idfile[15];       /* Unix style name for data file copy */
  258.       char        work[FILENAME_MAX];   /* temp area for filename hacking */
  259.       char        search_file[FILENAME_MAX];
  260.       char        source_path[FILENAME_MAX];
  261.       char        icfilename[FILENAME_MAX]; /* our hacked c file path */
  262.       char        idfilename[FILENAME_MAX]; /* our hacked d file path */
  263.  
  264.       struct  stat    statbuf;
  265.       DIR *dirp = NULL;
  266.       struct direct *dp = NULL;
  267.       char subseq = 'A';
  268.  
  269.       long    int     sequence;
  270.       char    *remote_syst;   /* Non-local system in copy            */
  271.       char    *sequence_s;
  272.       FILE        *cfile;
  273.       static  char    *spool_fmt = SPOOLFMT;
  274.  
  275.       sequence = getseq();
  276.       sequence_s = JobNumber( sequence );
  277.       remote_syst =  equal(src_syst, E_nodename) ? dest_syst : src_syst;
  278.       sprintf(tmfile, spool_fmt, 'C', remote_syst, grade, sequence_s);
  279.       importpath(work, tmfile, remote_syst);
  280.       mkfilename(icfilename, E_spooldir, work);
  281.  
  282.       if (!equal(src_syst, E_nodename))
  283.       {
  284.          if (expand_path(dest_file, NULL, E_homedir, NULL) == NULL)
  285.             exit(1);
  286.          strcpy( dest_file, normalize( dest_file ));
  287.          p  = src_file;
  288.          while (*p)
  289.          {
  290.             if (*p ==  '\\')
  291.                *p = '/';
  292.             p++;
  293.          }
  294.          printmsg(1, "uucp - from \"%s\" - control = %s", src_syst,
  295.                   tmfile);
  296.          if ((cfile = FOPEN(icfilename, "a", TEXT )) == NULL)  {
  297.             printerr( icfilename );
  298.             fprintf(stderr, "uucp: cannot append to %s\n", icfilename);
  299.             panic();
  300.          }
  301.          fprintf(cfile, "R %s %s %s -%s %s 0777 %s\n", src_file, dest_file,
  302.                E_mailbox, flags, *spool_file ? spool_file : "dummy", remote_user);
  303.          fclose(cfile);
  304.          return(1);
  305.       }
  306.       else if (!equal(dest_syst, E_nodename))  {
  307.          printmsg(1,"uucp - spool %s - mkdir %s - execute %s",
  308.                 spool_flag ? "on" : "off",
  309.                   dir_flag ? "on" : "off", xeqt_flag ? "do" : "don't");
  310.  
  311.          printmsg(1,"     - dest m/c = %s  sequence = %ld  control = %s",
  312.                   dest_syst, sequence, tmfile);
  313.  
  314.          if (expand_path(src_file, NULL, E_homedir, NULL) == NULL)
  315.             exit(1);
  316.          normalize( src_file );
  317.  
  318.          p  = dest_file;
  319.  
  320.          while (*p)
  321.          {
  322.             if (*p ==  '\\')
  323.                *p = '/';
  324.             p++;
  325.          }
  326.  
  327.          if (strcspn(src_file, "*?") == strlen(src_file))
  328.          {
  329.             wild_flag = FALSE;
  330.  
  331.             if (stat(src_file, &statbuf) != 0)
  332.             {
  333.                printerr( src_file );
  334.                exit(1);
  335.             }
  336.  
  337.             if (statbuf.st_mode & S_IFDIR)
  338.             {
  339.                printf("uucp - directory name \"%s\" illegal\n",
  340.                        src_file );
  341.                exit(1);
  342.             }
  343.          } /* if (strcspn(src_file, "*?") == strlen(src_file))  */
  344.          else  {
  345.             wild_flag = TRUE;
  346.             strcpy(source_path, src_file);
  347.             p = strrchr(source_path, '/');
  348.             strcpy(search_file, p+1);
  349.             *++p = '\0';
  350.  
  351.             dirp = opendirx(source_path,search_file);
  352.             if (dirp == NULL)
  353.             {
  354.                printf("uucp - unable to open directory %s\n",source_path);
  355.                exit(1);
  356.             } /* if */
  357.  
  358.             if ((dp = readdir(dirp)) == nil(struct direct))
  359.             {
  360.                printf("uucp - can't find any file %s\n", search_file);
  361.                exit(1);
  362.             }
  363.          } /* else */
  364.  
  365.          write_flag = TRUE;
  366.  
  367.          while (write_flag)
  368.          {
  369.             if (wild_flag)
  370.             {
  371.                strcpy(src_file, source_path);
  372.                strlwr( dp->d_name );
  373.                strcat( strcpy(src_file, source_path), dp->d_name );
  374.                strcpy( src_file, normalize( src_file ));
  375.                printf("Queueing file %s for %s!%s\n", src_file, dest_syst,
  376.                         dest_file);
  377.             }
  378.             if (spool_flag)  {
  379.                sprintf(idfile , spool_fmt, 'D', E_nodename, (char) subseq++,
  380.                            sequence_s);
  381.                importpath(work, idfile, remote_syst);
  382.                mkfilename(idfilename, E_spooldir, work);
  383.                /* Do we need a MKDIR here for the system? */
  384.                if (cp(src_file, idfilename) != 0)  {
  385.                   printmsg(0, "copy \"%s\" to \"%s\" failed",
  386.                      src_file, idfilename);           /* copy data */
  387.                   closedir( dirp );
  388.                   exit(1);
  389.                }
  390.             }
  391.             else
  392.                strcpy(idfile, "D.0");
  393.             if ((cfile = FOPEN(icfilename, "a", TEXT)) == NULL)  {
  394.                printerr( icfilename );
  395.                printf("uucp: cannot append to %s\n", icfilename);
  396.                if (dirp != NULL )
  397.                   closedir( dirp );
  398.                exit(1);
  399.             }
  400.             fprintf(cfile, "S %s %s %s -%s %s 0666 %s\n", src_file, dest_file,
  401.                      E_mailbox, flags, idfile, remote_user);
  402.             fclose(cfile);
  403.             if (wild_flag)  {
  404.                dp = readdir(dirp);
  405.                if ( dp == NULL )
  406.                   write_flag = FALSE;
  407.             }
  408.             else
  409.                write_flag = FALSE;
  410.          }
  411.          if (dirp != NULL )
  412.             closedir( dirp );
  413.          return(1);
  414.       }
  415.       else  {
  416.          if (expand_path(src_file, NULL, E_homedir, NULL) == NULL)
  417.             exit(1);
  418.          if (expand_path(dest_file, NULL, E_homedir, NULL) == NULL)
  419.             exit(1);
  420.          if (strcmp(src_file, dest_file) == 0)
  421.          {
  422.             fprintf(stderr, "%s %s - same file; can't copy\n",
  423.                   src_file, dest_file);
  424.             exit(1);
  425.          }
  426.          cp(src_file, dest_file);
  427.          return(1);
  428.       }
  429. }
  430.  
  431. /*--------------------------------------------------------------------*/
  432. /*    m a i n                                                         */
  433. /*                                                                    */
  434. /*    main program, of course                                         */
  435. /*--------------------------------------------------------------------*/
  436.  
  437. void  main(int argc, char *argv[])
  438. {
  439.       int         i;
  440.       int         option;
  441.       boolean j_flag = FALSE;
  442.       char        src_system[100], dest_system[100];
  443.       char        src_inter[100],  dest_inter[100];
  444.       char        src_file[FILENAME_MAX],   dest_file[FILENAME_MAX];
  445.  
  446. /*--------------------------------------------------------------------*/
  447. /*                             Initialize                             */
  448. /*--------------------------------------------------------------------*/
  449.  
  450.       debuglevel = 0;
  451.  
  452.       banner( argv );
  453.       if (!configure(B_UUCP))
  454.          exit(1);
  455.  
  456. /*--------------------------------------------------------------------*/
  457. /*                        Process option flags                        */
  458. /*--------------------------------------------------------------------*/
  459.  
  460.       while ((option = getopt(argc, argv, "Ccdfg:jmn:rs:x:")) != EOF)  {
  461.          switch(option)  {
  462.             case 'c':               /* don't spool */
  463.                spool_flag = FALSE;
  464.                break;
  465.             case 'C':               /* force spool */
  466.                spool_flag = TRUE;
  467.                break;
  468.             case 'd':               /* make directories */
  469.                dir_flag = TRUE;
  470.                break;
  471.             case 'e':               /* send uucp command to sys */
  472.                /* This one is in Sams but nowhere else - I'm ignoring it */
  473.                break;
  474.             case 'f':               /* don't make directories */
  475.                dir_flag = FALSE;
  476.                break;
  477.             case 'g':               /* set grade of transfer */
  478.                grade = *optarg;
  479.                break;
  480.             case 'j':               /* output job id to stdout */
  481.                j_flag = TRUE;
  482.                break;
  483.             case 'm':               /* send mail when copy completed */
  484.                mail_me = TRUE;
  485.                break;
  486.             case 'n':               /* notify remote user file was sent */
  487.                mail_them = TRUE;
  488.                sprintf(remote_user, "%.8s", optarg);
  489.                break;
  490.             case 'r':               /* queue job only */
  491.                xeqt_flag = FALSE;
  492.                break;
  493.             case 's':               /* report status of transfer to file */
  494.                strcpy( spool_file, optarg);
  495.                expand_path( spool_file, NULL, E_pubdir , NULL);
  496.                break;
  497.             case 'x':               /* set debug level */
  498.                debuglevel = atoi(optarg);
  499.                break;
  500.             default:
  501.                usage();
  502.                exit(1);
  503.                break;
  504.          }
  505.       }
  506.       flags[0] = (char)(dir_flag ? 'd' : 'f');
  507.       flags[1] = (char)(spool_flag ? 'C' : 'c');
  508.       i = 2;
  509.       if (mail_them)
  510.          flags[i++] = 'n';
  511.       flags[i] = '\0';
  512.       if (remote_user[0] == '\0')
  513.          strcpy(remote_user, E_mailbox);
  514.       if (argc - optind < 2)  {
  515.          usage();
  516.          exit(1);
  517.       }
  518. /*--------------------------------------------------------------------*/
  519. /*       Now - posibilities:                                          */
  520. /*       Sources - 1 or more, local or 1 hop away (NOT > 1 hop!)      */
  521. /*       Dest    - normal cp rules, single only, local, 1 hop or >1   */
  522. /*                 hop                                                */
  523. /*       Wildcards possible on sources.                               */
  524. /*                                                                    */
  525. /*    Actions depend on these - so we need to split the pathnames     */
  526. /*    for more info.                                                  */
  527. /*--------------------------------------------------------------------*/
  528.  
  529.       split_path(argv[argc - 1], dest_system, dest_inter, dest_file);
  530.  
  531. /*--------------------------------------------------------------------*/
  532. /*        OK - we have a destination system - do we know him?         */
  533. /*--------------------------------------------------------------------*/
  534.  
  535.       if (*dest_system != '\0')  {
  536.          if (checkreal(dest_system) == BADHOST)  {
  537.             fprintf(stderr, "uucp - bad system: %s\n", dest_system);
  538.             exit(1);
  539.          }
  540.       }
  541.       else        /* make sure we have a system name for destination */
  542.          strcpy(dest_system, E_nodename);
  543.       printmsg(9, "destination: system \"%s\", inter \"%s\", file \"%s\"",
  544.             dest_system, dest_inter, dest_file);
  545.  
  546. /*--------------------------------------------------------------------*/
  547. /*    Now - if there is more than 1 source then normal cp rules,      */
  548. /*          i.e. dest must be a directory                             */
  549. /*--------------------------------------------------------------------*/
  550.  
  551.       if (argc - optind > 2)
  552.          strcat(dest_file, "/");
  553.       destn_file = argv[argc - 1];
  554.       for (i = optind; i < (argc - 1); i++)  {
  555.          split_path(argv[i], src_system, src_inter, src_file);
  556.  
  557. /*--------------------------------------------------------------------*/
  558. /*            We need to winnow out various combinations -            */
  559. /*                        so lets get at them                         */
  560. /*                                                                    */
  561. /*                   Do we know the source system?                    */
  562. /*--------------------------------------------------------------------*/
  563.  
  564.          if (*src_system != '\0')  {
  565.             if (checkreal(src_system) == BADHOST)  {
  566.                fprintf(stderr, "uucp - bad system %s\n", src_system);
  567.                exit(1);
  568.             }
  569.          }
  570.  
  571. /*--------------------------------------------------------------------*/
  572. /*                    Source can't be >1 hop away                     */
  573. /*--------------------------------------------------------------------*/
  574.  
  575.          if (*src_inter != '\0')  {
  576.             fprintf(stderr, "uucp - illegal syntax %s\n", argv[i]);
  577.             exit(1);
  578.          }
  579.  
  580. /*--------------------------------------------------------------------*/
  581. /*        if source is remote AND wildcarded then we need uux         */
  582. /*--------------------------------------------------------------------*/
  583.  
  584.          if ((*src_system != '\0') && (strcspn(src_file, "*?[") < strlen(src_file)))  {
  585.             do_uux(src_system, src_system, src_file, dest_system, dest_inter, dest_file);
  586.             continue;
  587.          }
  588.  
  589. /*--------------------------------------------------------------------*/
  590. /*            if dest requires forwarding then we need uux            */
  591. /*--------------------------------------------------------------------*/
  592.  
  593.          if (*dest_inter != '\0')  {
  594.             do_uux(dest_system, src_system, src_file, "", dest_inter, dest_file);
  595.             continue;
  596.          }
  597.  
  598. /*--------------------------------------------------------------------*/
  599. /*         if both source & dest are remote then we need uux          */
  600. /*--------------------------------------------------------------------*/
  601.  
  602.          if ((*src_system != '\0') && (!equal(src_system, E_nodename)) &&
  603.                (*dest_system != '\0') && (!equal(dest_system, E_nodename)))  {
  604.             do_uux(dest_system, src_system, src_file, "", dest_inter, dest_file);
  605.             continue;
  606.          }
  607. /*--------------------------------------------------------------------*/
  608. /*          We have left 3 options:                                   */
  609. /*          1) src remote (non-wild) & dest local                     */
  610. /*          2) src local & dest remote 1 hop                          */
  611. /*          3) src & dest both local                                  */
  612. /*                                                                    */
  613. /*               fill up the src system if not already                */
  614. /*--------------------------------------------------------------------*/
  615.          if (*src_system == '\0')
  616.             strcpy(src_system, E_nodename);
  617.          printmsg(4, "source: system \"%s\", file \"%s\"", src_system,
  618.                      src_file);
  619.          do_copy(src_system, src_file, dest_system, dest_file);
  620.       }
  621.       if (xeqt_flag)
  622.          printmsg(1, "Call uucico");
  623.       if (j_flag)
  624.          printmsg(1,"j_flag");
  625.       exit(0);
  626. }
  627.