Changeset 133

Show
Ignore:
Timestamp:
10/26/04 10:17:10 (4 years ago)
Author:
morris
Message:

whitespace cleanup

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wire/trunk/Makefile.in

    r121 r133  
    4444install: all install-man 
    4545        @echo "Making $@ in ." 
    46          
     46 
    4747        $(INSTALL) -m 755 run/wire $(bindir) 
    4848 
     
    5353        @echo "" 
    5454        @echo "Manual pages have been installed into $(mandir)." 
    55          
     55 
    5656install-man: 
    5757        $(INSTALL) -m 644 man/wire.1 $(mandir)/man1/ 
     
    8686autoclean: 
    8787        @echo "Making $@ in ." 
    88          
     88 
    8989        $(RM) -rf autom4te.cache 
    9090        $(RM) -f autoscan.log configure.scan config.h.in~ 
     
    9292cvsclean: 
    9393        @echo "Making $@ in ." 
    94          
     94 
    9595        $(FIND) . -name .DS_Store -print0 | $(XARGS) -0 $(RM) -f 
    9696        $(FIND) . -name CVS -print0 | $(XARGS) -0 $(RM) -rf 
  • wire/trunk/configure.in

    r132 r133  
    2020AC_DEFUN([WR_MSG_LIB_ERROR], [ 
    2121        AC_MSG_ERROR([could not locate $1 
    22          
     22 
    2323If you installed $1 into a non-standard directory, please run: 
    2424 
     
    164164], [ 
    165165        AC_MSG_ERROR([no]) 
    166 ])      
     166]) 
    167167 
    168168 
     
    189189        AC_CHECK_LIB([readline], [main], [ 
    190190                LIBS="$LIBS -lreadline" 
    191                  
     191 
    192192                AC_MSG_CHECKING([for rl_completion_matches]) 
    193193                AC_TRY_RUN([ 
     
    199199                        int main(void) { 
    200200                                char **matches = rl_completion_matches("", generator); 
    201                                  
     201 
    202202                                return 0; 
    203203                        } 
     
    205205                        AC_DEFINE([HAVE_RL_COMPLETION_MATCHES], [1], [Define to 1 if you have the `rl_completion_matches' function, and to 0 otherwise.]) 
    206206                        AC_MSG_RESULT([yes]) 
    207                          
     207 
    208208                ], [ 
    209209                        AC_MSG_RESULT([no]) 
  • wire/trunk/install-sh

    r2 r133  
    116116        dst=$src 
    117117        src="" 
    118          
     118 
    119119        if [ -d $dst ]; then 
    120120                instcmd=: 
     
    126126 
    127127# Waiting for this to be detected by the "$instcmd $src $dsttmp" command 
    128 # might cause directories to be created, which would be especially bad  
     128# might cause directories to be created, which would be especially bad 
    129129# if $src (and thus $dsttmp) contains '*'. 
    130130 
     
    136136                exit 1 
    137137        fi 
    138          
     138 
    139139        if [ x"$dst" = x ] 
    140140        then 
     
    203203# If we're going to rename the final executable, determine the name now. 
    204204 
    205         if [ x"$transformarg" = x ]  
     205        if [ x"$transformarg" = x ] 
    206206        then 
    207207                dstfile=`basename $dst` 
    208208        else 
    209                 dstfile=`basename $dst $transformbasename |  
     209                dstfile=`basename $dst $transformbasename | 
    210210                        sed $transformarg`$transformbasename 
    211211        fi 
     
    213213# don't allow the sed command to completely eliminate the filename 
    214214 
    215         if [ x"$dstfile" = x ]  
     215        if [ x"$dstfile" = x ] 
    216216        then 
    217217                dstfile=`basename $dst` 
     
    244244 
    245245        $doit $rmcmd -f $dstdir/$dstfile && 
    246         $doit $mvcmd $dsttmp $dstdir/$dstfile  
     246        $doit $mvcmd $dsttmp $dstdir/$dstfile 
    247247 
    248248fi && 
  • wire/trunk/man/wire.1

    r85 r133  
    4646.Nm wire , 
    4747.Pa ~/.wire/bookmark 
    48 will also be read and interpreted. Note that commands in such files should not be prepended by a  
     48will also be read and interpreted. Note that commands in such files should not be prepended by a 
    4949.Sq / 
    5050character. 
     
    6262character conversion system. Please consult the 
    6363.Xr iconv 3 
    64 manual for valid settings. The default value is  
     64manual for valid settings. The default value is 
    6565.Sq ISO-8859-1 , 
    6666which corresponds to ISO Latin 1 and should be okay for most systems. 
     
    101101.Ar path . 
    102102.It Nm help Op Ar command 
    103 If specified, display help for the command  
     103If specified, display help for the command 
    104104.Ar command . 
    105105Otherwise, display a list of available commands. 
  • wire/trunk/wire/Makefile.in

    r2 r133  
    4949        $(LINK) $(OBJECTS) $(LIBS) 
    5050        $(CP) wire ../run/ 
    51          
     51 
    5252.c.o: 
    5353        $(COMPILE) -c $< 
     
    5858distclean: clean 
    5959        $(RM) -f wire Makefile config.* 
    60         $(RM) -f ../run/wire  
     60        $(RM) -f ../run/wire 
  • wire/trunk/wire/client.c

    r131 r133  
    1 /* $Id: client.c,v 1.33 2004/10/26 07:33:14 morris Exp $ */ 
     1/* $Id: client.c,v 1.34 2004/10/26 08:17:10 morris Exp $ */ 
    22 
    33/* 
    44 *  Copyright (c) 2004 Axel Andersson 
    55 *  All rights reserved. 
    6  *  
     6 * 
    77 *  Redistribution and use in source and binary forms, with or without 
    88 *  modification, are permitted provided that the following conditions 
     
    1313 *     notice, this list of conditions and the following disclaimer in the 
    1414 *     documentation and/or other materials provided with the distribution. 
    15  *  
     15 * 
    1616 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 
    1717 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
     
    117117                if(user->uid == uid) { 
    118118                        value = user; 
    119                  
     119 
    120120                        break; 
    121121                } 
     
    132132        wr_user_t               *user, *value = NULL; 
    133133        char                    *name; 
    134          
     134 
    135135        /* dequote name */ 
    136136        name = ((*rl_filename_dequoting_function) (nick, 0)); 
     
    141141                if(strcmp(name, user->nick) == 0) { 
    142142                        value = user; 
    143                  
     143 
    144144                        break; 
    145145                } 
    146146        } 
    147147        WR_LIST_UNLOCK(wr_users); 
    148          
     148 
    149149        /* free nick */ 
    150150        free(name); 
     
    164164                if(strcmp(transfer->path, path) == 0) { 
    165165                        value = transfer; 
    166                  
     166 
    167167                        break; 
    168168                } 
     
    184184                if(transfer->sd == sd) { 
    185185                        value = transfer; 
    186                  
     186 
    187187                        break; 
    188188                } 
     
    204204                if(transfer->tid == tid) { 
    205205                        value = transfer; 
    206                  
     206 
    207207                        break; 
    208208                } 
     
    218218        wr_list_node_t  *node; 
    219219        wr_ignore_t             *ignore; 
    220          
     220 
    221221        /* loop over ignores */ 
    222222        WR_LIST_LOCK(wr_ignores); 
     
    226226        } 
    227227        WR_LIST_UNLOCK(wr_ignores); 
    228          
     228 
    229229        return false; 
    230230} 
     
    243243                length = strlen(text); 
    244244        } 
    245          
     245 
    246246        for(; node != NULL; ) { 
    247247                user = WR_LIST_DATA(node); 
    248248                node = WR_LIST_NEXT(node); 
    249                  
     249 
    250250                if(strncasecmp(user->nick, text, length) == 0) 
    251251                        return strdup(user->nick); 
    252252        } 
    253          
     253 
    254254        return NULL; 
    255255} 
     
    272272                wr_list_free(&wr_files); 
    273273                wr_list_create(&wr_files); 
    274                  
     274 
    275275                /* copy text */ 
    276276                path = strdup(deq_text); 
    277                  
     277 
    278278                /* find the path portion of text */ 
    279279                if((p = strrchr(path, '/'))) { 
     
    296296                /* free copy */ 
    297297                free(path); 
    298                  
     298 
    299299                /* list path */ 
    300300                wr_send_command("LIST %s%s", 
     
    304304                /* enter loop */ 
    305305                wr_loop(false, 411, 3.0); 
    306                  
     306 
    307307                /* set first node */ 
    308308                node = WR_LIST_FIRST(wr_files); 
    309309        } 
    310          
     310 
    311311        /* get basename */ 
    312312        base = basename_np(deq_text); 
    313313        length = strlen(base); 
    314                  
     314 
    315315        /* loop & match */ 
    316316        for(; node != NULL; ) { 
    317317                file = WR_LIST_DATA(node); 
    318318                node = WR_LIST_NEXT(node); 
    319                  
     319 
    320320                /* skip non-folders */ 
    321321                if(file->type == WR_FILE_FILE && wr_ls_state == WR_LS_COMPLETING_DIRECTORY) 
    322322                        continue; 
    323                  
     323 
    324324                if(strncasecmp(file->name, base, length) == 0) { 
    325325                        /* append / if directory */ 
     
    328328                        else 
    329329                                rl_completion_append_character = ' '; 
    330                                  
     330 
    331331                        /* just the filename */ 
    332332                        if(strlen(saved_path) == 0) 
    333333                                return strdup(file->name); 
    334                                  
     334 
    335335                        /* concat path & filename */ 
    336336                        bytes = strlen(saved_path) + strlen(file->name) + 2; 
    337337                        match = malloc(bytes); 
    338338                        snprintf(match, bytes, "%s%s", saved_path, file->name); 
    339                          
     339 
    340340                        return match; 
    341341                } 
     
    344344        /* release dequoted text */ 
    345345        free(deq_text); 
    346          
     346 
    347347        return NULL; 
    348348} 
     
    359359                length = strlen(text); 
    360360        } 
    361          
     361 
    362362        for(; node != NULL; ) { 
    363363                ignore = WR_LIST_DATA(node); 
    364364                node = WR_LIST_NEXT(node); 
    365                  
     365 
    366366                if(strncasecmp(ignore->string, text, length) == 0) 
    367367                        return strdup(ignore->string); 
    368368        } 
    369          
     369 
    370370        return NULL; 
    371371} 
     
    391391        /* copy values */ 
    392392        wr_port = port; 
    393          
     393 
    394394        if(port != 2000) 
    395395                snprintf(wr_host, sizeof(wr_host), "%s:%d", host, port); 
     
    505505        /* send initial login */ 
    506506        wr_send_command("HELLO%s", WR_MESSAGE_SEPARATOR); 
    507          
     507 
    508508        /* hash the password */ 
    509509        memset(wr_password_sha, 0, sizeof(wr_password_sha)); 
    510          
     510 
    511511        if(strlen(wr_password) > 0) { 
    512512                SHA1_Init(&c); 
    513513                SHA1_Update(&c, (unsigned char *) wr_password, strlen(wr_password)); 
    514514                SHA1_Final(sha, &c); 
    515          
     515 
    516516                /* map into hexademical characters */ 
    517517                for(i = 0; i < SHA_DIGEST_LENGTH; i++) { 
     
    519519                        wr_password_sha[i+i+1]  = hex[sha[i] & 0x0F]; 
    520520                } 
    521                          
     521 
    522522                wr_password_sha[i+i] = '\0'; 
    523523        } 
    524          
     524 
    525525        /* set connected */ 
    526526        wr_connected = true; 
     
    534534                if(SSL_shutdown(wr_ssl) == 0) 
    535535                        SSL_shutdown(wr_ssl); 
    536                  
     536 
    537537                SSL_free(wr_ssl); 
    538538                wr_ssl = NULL; 
     
    549549                wr_socket = -1; 
    550550        } 
    551          
     551 
    552552        /* clean up */ 
    553553        if(wr_connected) { 
     
    556556                wr_printf_prefix("Connection to %s closed\n", 
    557557                        wr_host); 
    558                  
     558 
    559559                wr_list_free(&wr_users); 
    560560                wr_list_free(&wr_files); 
    561561                wr_list_free(&wr_transfers); 
    562                  
     562 
    563563                memset(wr_topic, 0, sizeof(wr_topic)); 
    564                  
     564 
    565565                wr_draw_header(); 
    566566                wr_draw_transfers(); 
    567567                wr_draw_divider(); 
    568568        } 
    569          
     569 
    570570        wr_connected = false; 
    571571        wr_received = false; 
     
    576576void wr_close_transfer(wr_transfer_t *transfer) { 
    577577        wr_list_node_t  *node; 
    578          
     578 
    579579        /* close SSL */ 
    580580        if(transfer->ssl) { 
    581581                if(SSL_shutdown(transfer->ssl) == 0) 
    582582                        SSL_shutdown(transfer->ssl); 
    583                  
     583 
    584584                SSL_free(transfer->ssl); 
    585585                transfer->ssl = NULL; 
    586586        } 
    587          
     587 
    588588        /* close TCP */ 
    589589        if(transfer->sd != -1) { 
     
    591591                transfer->sd = -1; 
    592592        } 
    593          
     593 
    594594        /* close file */ 
    595595        if(transfer->fp) { 
     
    597597                transfer->fp = NULL; 
    598598        } 
    599          
     599 
    600600        /* remove from list */ 
    601601        node = wr_list_get_node(&wr_transfers, transfer); 
    602          
     602 
    603603        if(node) 
    604604                wr_list_delete(&wr_transfers, node); 
     
    700700                        wr_msg_311(argc, argv); 
    701701                        break; 
    702                  
     702 
    703703                case 320: 
    704704                        wr_msg_320(argc, argv); 
    705705                        break; 
    706                  
     706 
    707707                case 321: 
    708708                        wr_msg_321(argc, argv); 
     
    712712                        wr_msg_322(argc, argv); 
    713713                        break; 
    714                  
     714 
    715715                case 340: 
    716716                        break; 
    717                          
     717 
    718718                case 341: 
    719719                        wr_msg_341(argc, argv); 
    720720                        break; 
    721                  
     721 
    722722                case 400: 
    723723                        wr_msg_400(argc, argv); 
    724724                        break; 
    725                  
     725 
    726726                case 401: 
    727727                        wr_msg_401(argc, argv); 
    728728                        break; 
    729                  
     729 
    730730                case 402: 
    731731                        wr_msg_402(argc, argv); 
    732732                        break; 
    733                  
     733 
    734734                case 410: 
    735735                        wr_msg_410(argc, argv); 
    736736                        break; 
    737                  
     737 
    738738                case 411: 
    739739                        wr_msg_411(argc, argv); 
     
    821821        if(arg) 
    822822                free(arg); 
    823          
     823 
    824824        if(argc > 0) 
    825825                wr_argv_free(argc, argv); 
    826          
     826 
    827827        return message; 
    828828} 
     
    923923        /* get user */ 
    924924        user = wr_get_user(strtoul(argv[1], NULL, 10)); 
    925          
     925 
    926926        if(user) { 
    927927                /* ignore */ 
    928928                if(wr_ignore_nick(user->nick)) 
    929929                        return; 
    930          
     930 
    931931                /* print */ 
    932932                wr_print_say(user->nick, argv[2]); 
     
    941941        /* get user */ 
    942942        user = wr_get_user(strtoul(argv[1], NULL, 10)); 
    943          
     943 
    944944        if(user) { 
    945945                /* ignore */ 
    946946                if(wr_ignore_nick(user->nick)) 
    947947                        return; 
    948          
     948 
    949949                /* print */ 
    950950                wr_print_me(user->nick, argv[2]); 
     
    990990                /* print event */ 
    991991                wr_printf_prefix("%s has left\n", user->nick); 
    992                  
     992 
    993993                /* delete user */ 
    994994                wr_list_delete(&wr_users, node); 
     
    10101010                        wr_printf_prefix("%s is now known as %s\n", 
    10111011                                user->nick, argv[4]); 
    1012                          
     1012 
    10131013                        strlcpy(user->nick, argv[4], sizeof(user->nick)); 
    10141014                } 
     
    10281028        /* get user */ 
    10291029        user = wr_get_user(strtoul(argv[0], NULL, 10)); 
    1030          
     1030 
    10311031        if(user) { 
    10321032                /* ignore */ 
    10331033                if(wr_ignore_nick(user->nick)) 
    10341034                        return; 
    1035          
     1035 
    10361036                /* print message */ 
    10371037                wr_printf_prefix("Private message from %s:\n", user->nick); 
    10381038                wr_printf_block("%s", argv[1]); 
    1039                  
     1039 
    10401040                wr_reply_uid = user->uid; 
    10411041        } 
     
    10581058                        victim->nick, killer->nick, argv[2]); 
    10591059        } 
    1060          
     1060 
    10611061        if(node) { 
    10621062                /* delete user */ 
     
    10821082                        victim->nick, killer->nick, argv[2]); 
    10831083        } 
    1084          
     1084 
    10851085        if(node) { 
    10861086                /* delete user */ 
     
    11041104        /* print info */ 
    11051105        wr_printf_prefix("User info for %s:\n", argv[4]); 
    1106          
     1106 
    11071107        if(wr_protocol >= 1.1) 
    11081108                wr_printf_block("Status:      %s", argv[15]); 
    1109          
     1109 
    11101110        wr_printf_block("Login:       %s", argv[5]); 
    11111111        wr_printf_block("ID:          %s", argv[0]); 
     
    11241124        strftime(ftime, sizeof(ftime), "%a %T %Y", &tm); 
    11251125        wr_printf_block("Idle Time:   %s", ftime); 
    1126          
     1126 
    11271127        /* print transfers */ 
    11281128        for(n = WR_TRANSFER_DOWNLOAD; n <= WR_TRANSFER_UPLOAD; n++) { 
     
    11311131                else 
    11321132                        p = argv[14]; 
    1133                  
     1133 
    11341134                if(strlen(p) > 0) { 
    11351135                        j = 0; 
    1136                          
     1136 
    11371137                        while((ap = strsep(&p, WR_GROUP_SEPARATOR))) { 
    11381138                                q = ap; 
    11391139                                i = 0; 
    1140                                  
     1140 
    11411141                                while((ap = strsep(&q, WR_RECORD_SEPARATOR))) { 
    11421142                                        switch(i++) { 
     
    11441144                                                        strlcpy(name, basename_np(ap), sizeof(name)); 
    11451145                                                        break; 
    1146                                                  
     1146 
    11471147                                                case 1: 
    11481148                                                        wr_text_format_size(transferred, strtoull(ap, NULL, 10), 
    11491149                                                                                                sizeof(transferred)); 
    11501150                                                        break; 
    1151                                                  
     1151 
    11521152                                                case 2: 
    11531153                                                        wr_text_format_size(size, strtoull(ap, NULL, 10), 
    11541154                                                                                                sizeof(size)); 
    11551155                                                        break; 
    1156                                                  
     1156 
    11571157                                                case 3: 
    11581158                                                        wr_text_format_size(speed, strtoul(ap, NULL, 10), 
     
    11611161                                        } 
    11621162                                } 
    1163                                          
     1163 
    11641164                                if(j++ == 0) { 
    11651165                                        if(n == WR_TRANSFER_DOWNLOAD) { 
     
    11911191                if(wr_ignore_nick(user->nick)) 
    11921192                        return; 
    1193          
     1193 
    11941194                /* print message */ 
    11951195                wr_printf_prefix("Broadcast message from %s:\n", user->nick); 
     
    12311231        struct tm               tm; 
    12321232        char                    ftime[26]; 
    1233          
     1233 
    12341234        if(wr_news_count >= 0) { 
    12351235                wr_news_count++; 
    1236          
     1236 
    12371237                if(wr_news_count > wr_news_limit) { 
    12381238                        wr_printf_prefix("news: Displayed %d %s, use /news -ALL to see more\n", 
     
    12411241                                        ? "entry" 
    12421242                                        : "entries"); 
    1243                          
     1243 
    12441244                        wr_news_count = -1; 
    12451245                } else { 
    12461246                        wr_iso8601_to_time(argv[1], &tm); 
    12471247                        strftime(ftime, sizeof(ftime), "%b %e %T %Y", &tm); 
    1248                  
     1248 
    12491249                        wr_printf_prefix("From %s (%s):\n", argv[0], ftime); 
    12501250                        wr_printf_block("%s", argv[2]); 
     
    12781278        wr_transfer_t           *transfer; 
    12791279        struct sockaddr_in      addr; 
    1280          
     1280 
    12811281        /* get transfer */ 
    12821282        transfer = wr_get_transfer(argv[0]); 
    1283          
     1283 
    12841284        if(!transfer) 
    12851285                return; 
     
    12871287        /* set state */ 
    12881288        transfer->state = WR_TRANSFER_RUNNING; 
    1289          
     1289 
    12901290        /* copy hash */ 
    12911291        strlcpy(transfer->hash, argv[2], sizeof(transfer->hash)); 
    1292          
     1292 
    12931293        /* open destination file */ 
    12941294        transfer->fp = fopen(transfer->local_path_partial, "a+"); 
    1295          
     1295 
    12961296        if(!transfer->fp) { 
    12971297                wr_printf_prefix("Could not open %s: %s\n", 
     
    13011301                return; 
    13021302        } 
    1303          
     1303 
    13041304        /* seek to destination */ 
    13051305        fseeko(transfer->fp, transfer->offset, SEEK_SET); 
    1306          
     1306 
    13071307        /* create new socket */ 
    13081308        transfer->sd = socket(AF_INET, SOCK_STREAM, 0); 
     
    13151315                return; 
    13161316        } 
    1317          
     1317 
    13181318        /* set new port */ 
    13191319        addr = wr_addr; 
     
    13601360                transfer->hash, 
    13611361                WR_MESSAGE_SEPARATOR); 
    1362          
     1362 
    13631363        /* set time */ 
    13641364        transfer->start_time = time(NULL); 
    1365          
     1365 
    13661366        /* print status */ 
    13671367        wr_printf_prefix("Starting transfer of \"%s\"\n", 
     
    13731373void wr_msg_401(int argc, char *argv[]) { 
    13741374        wr_transfer_t   *transfer; 
    1375          
     1375 
    13761376        /* get transfer */ 
    13771377        transfer = wr_get_transfer(argv[0]); 
    1378          
     1378 
    13791379        if(!transfer) 
    13801380                return; 
    1381          
     1381 
    13821382        /* set state */ 
    13831383        transfer->state = WR_TRANSFER_QUEUED; 
    1384          
     1384 
    13851385        /* set number in queue */ 
    13861386        transfer->queue = strtoul(argv[1], NULL, 10); 
     
    14101410                /* print info */ 
    14111411                wr_printf_prefix("File info for %s:\n", basename_np(argv[0])); 
    1412                  
     1412 
    14131413                wr_printf("   Path:      %s\n", argv[0]); 
    1414          
     1414 
    14151415                switch(type) { 
    14161416                        case WR_FILE_FILE: 
    14171417                                wr_printf("   Kind:      File\n"); 
    14181418                                break; 
    1419          
     1419 
    14201420                        case WR_FILE_DIRECTORY: 
    14211421                                wr_printf("   Kind:      Folder\n"); 
    14221422                                break; 
    1423          
     1423 
    14241424                        case WR_FILE_UPLOADS: 
    14251425                                wr_printf("   Kind:      Uploads Folder\n"); 
    14261426                                break; 
    1427          
     1427 
    14281428                        case WR_FILE_DROPBOX: 
    14291429                                wr_printf("   Kind:      Drop Box Folder\n"); 
    14301430                                break; 
    1431                          
     1431 
    14321432                        default: 
    14331433                                break; 
    14341434                } 
    1435          
     1435 
    14361436                wr_printf("   Size:      %s\n", size_string); 
    1437          
     1437 
    14381438                /* print created time */ 
    14391439                wr_iso8601_to_time(argv[3], &tm); 
    14401440                strftime(ftime, sizeof(ftime), "%b %e %T %Y", &tm); 
    14411441                wr_printf("   Created:   %s\n", ftime); 
    1442          
     1442 
    14431443                /* print idle time */ 
    14441444                wr_iso8601_to_time(argv[4], &tm); 
    14451445                strftime(ftime, sizeof(ftime), "%b %e %T %Y", &tm); 
    14461446                wr_printf("   Modified:  %s\n", ftime); 
    1447          
     1447 
    14481448                /* print checksum */ 
    14491449                if(type == WR_FILE_FILE) 
    14501450                        wr_printf("   Checksum:  %s\n", argv[5]); 
    1451                  
     1451 
    14521452                /* print comment */ 
    14531453                if(wr_protocol >= 1.1) 
     
    14611461                transfer = wr_get_transfer(argv[0]); 
    14621462                node = wr_list_get_node(&wr_transfers, transfer); 
    1463                  
     1463 
    14641464                if(transfer) { 
    14651465                        /* check that it's a file */ 
     
    14671467                                wr_printf_prefix("get: Cannot download directories\n"); 
    14681468                                wr_list_delete(&wr_transfers, node); 
    1469                          
     1469 
    14701470                                return; 
    14711471                        } 
    1472                          
     1472 
    14731473                        /* set size */ 
    14741474                        transfer->size = size; 
    1475                          
     1475 
    14761476                        /* send get command */ 
    14771477                        wr_send_command("GET %s%s%llu%s", 
     
    14881488void wr_msg_410(int argc, char *argv[]) { 
    14891489        wr_file_t               *file; 
    1490          
     1490 
    14911491        /* create new file */ 
    14921492        file = (wr_file_t *) malloc(sizeof(wr_file_t)); 
     
    14981498        strlcpy(file->path, argv[0], sizeof(file->path)); 
    14991499        strlcpy(file->name, basename_np(argv[0]), sizeof(file->name)); 
    1500          
     1500 
    15011501        /* add to list */ 
    15021502        wr_list_add(&wr_files, file); 
     
    15091509        wr_file_t               *file; 
    15101510        unsigned int    length, max_length = 0; 
    1511          
     1511 
    15121512        if(wr_ls_state == WR_LS_LISTING) { 
    15131513                /* find max string length */ 
     
    15171517                        max_length = length > max_length ? length : max_length; 
    15181518                } 
    1519          
     1519 
    15201520                /* print files */ 
    15211521                wr_printf_prefix("Listing of %s:\n", wr_files_ld); 
    1522                  
     1522 
    15231523                WR_LIST_FOREACH(wr_files, node, file) 
    15241524                        wr_print_file(node->data, max_length); 
  • wire/trunk/wire/client.h

    r130 r133  
    1 /* $Id: client.h,v 1.16 2004/10/26 07:32:30 morris Exp $ */ 
     1/* $Id: client.h,v 1.17 2004/10/26 08:17:10 morris Exp $ */ 
    22 
    33/* 
     
    134134        wr_transfer_state_t                             state; 
    135135        wr_transfer_type_t                              type; 
    136          
     136 
    137137        int                                                             sd; 
    138138        SSL                                    &nbs