Changeset 774


Ignore:
Timestamp:
12/01/05 19:56:28 (6 years ago)
Author:
aj
Message:

Lindent these files.

Location:
trunk/src/ifd
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ifd/conf.c

    r683 r774  
    357357                return -1; 
    358358 
    359 again: 
     359      again: 
    360360        s = (char *)ct_buf_head(&config_buf); 
    361361        n = ct_buf_avail(&config_buf); 
  • trunk/src/ifd/driver.c

    r702 r774  
    175175        return n; 
    176176} 
    177  
  • trunk/src/ifd/ifdhandler.c

    r763 r774  
    103103 
    104104        /* Initialize IFD library */ 
    105         if (ifd_init())  
     105        if (ifd_init()) 
    106106                return 1; 
    107107 
     
    165165static void TERMhandler(int signo) 
    166166{ 
    167         ct_mainloop_leave(); 
     167        ct_mainloop_leave(); 
    168168} 
    169169 
  • trunk/src/ifd/init.c

    r770 r774  
    2020        /* initialize ltdl */ 
    2121        i = lt_dlinit(); 
    22         if (i != 0)  
    23                 ct_error("lt_dlinit returned %d",i); 
     22        if (i != 0) 
     23                ct_error("lt_dlinit returned %d", i); 
    2424 
    2525        /* Register built-in drivers */ 
  • trunk/src/ifd/pcmcia-block.c

    r732 r774  
    2020 */ 
    2121static int 
    22 ifd_pcmcia_block_send(ifd_device_t *dev, const unsigned char *buffer, size_t len) 
     22ifd_pcmcia_block_send(ifd_device_t * dev, const unsigned char *buffer, 
     23                      size_t len) 
    2324{ 
    24         size_t          total = len; 
    25         int             n; 
     25        size_t total = len; 
     26        int n; 
    2627 
    2728        while (len) { 
    2829                n = write(dev->fd, buffer, len); 
    2930                if (n < 0) { 
    30                         ct_error("Error writing to %s: %m", 
    31                                         dev->name); 
     31                        ct_error("Error writing to %s: %m", dev->name); 
    3232                        return -1; 
    3333                } 
     
    4040 
    4141static int 
    42 ifd_pcmcia_block_recv(ifd_device_t *dev, unsigned char *buffer, size_t len, long timeout) 
     42ifd_pcmcia_block_recv(ifd_device_t * dev, unsigned char *buffer, size_t len, 
     43                      long timeout) 
    4344{ 
    44         struct timeval  begin; 
     45        struct timeval begin; 
    4546        int n; 
    4647 
     
    5758        n = poll(&pfd, 1, wait); 
    5859        if (n < 0) { 
    59                 ct_error("%s: error while waiting for input: %m", 
    60                                 dev->name); 
     60                ct_error("%s: error while waiting for input: %m", dev->name); 
    6161                return -1; 
    6262        } 
     
    7474        return n; 
    7575 
    76 timeout:/* Timeouts are a little special; they may happen e.g. 
    77         * when trying to obtain the ATR */ 
     76      timeout:          /* Timeouts are a little special; they may happen e.g. 
     77                        * when trying to obtain the ATR */ 
    7878        if (!ct_config.suppress_errors) 
    7979                ct_error("%s: timed out while waiting for input", dev->name); 
     
    8484 * Close the device 
    8585 */ 
    86 static void 
    87 ifd_pcmcia_block_close(ifd_device_t *dev) 
     86static void ifd_pcmcia_block_close(ifd_device_t * dev) 
    8887{ 
    8988        if (dev->fd >= 0) 
     
    9796 * Open serial device 
    9897 */ 
    99 ifd_device_t * 
    100 ifd_open_pcmcia_block(const char *name) 
     98ifd_device_t *ifd_open_pcmcia_block(const char *name) 
    10199{ 
    102         ifd_device_t    *dev; 
    103         int             fd; 
     100        ifd_device_t *dev; 
     101        int fd; 
    104102 
    105103        if ((fd = open(name, O_RDWR)) < 0) { 
     
    113111 
    114112        dev = ifd_device_new(name, &ifd_pcmcia_block_ops, sizeof(*dev)); 
    115         dev->timeout = 1000; /* acceptable? */ 
     113        dev->timeout = 1000;    /* acceptable? */ 
    116114        dev->type = IFD_DEVICE_TYPE_PCMCIA_BLOCK; 
    117115        dev->fd = fd; 
     
    119117        return dev; 
    120118} 
    121  
  • trunk/src/ifd/proto-gbp.c

    r683 r774  
    272272        } 
    273273 
    274 done: 
     274      done: 
    275275        return ct_buf_avail(&rbuf); 
    276276 
    277 error: 
     277      error: 
    278278        gp->state = DEAD; 
    279279        return -1; 
  • trunk/src/ifd/proto-sync.c

    r683 r774  
    125125        } 
    126126 
    127 out: 
     127      out: 
    128128        if (!res) { 
    129129                ifd_protocol_free(p); 
     
    166166        return n; 
    167167 
    168 failed: 
     168      failed: 
    169169        if (p != NULL) 
    170170                ifd_protocol_free(p); 
  • trunk/src/ifd/proto-t1.c

    r663 r774  
    369369        } 
    370370 
    371 done: 
     371      done: 
    372372        return ct_buf_avail(&rbuf); 
    373373 
    374 error: 
     374      error: 
    375375        t1->state = DEAD; 
    376376        return -1; 
  • trunk/src/ifd/sys-null.c

    r772 r774  
    9999} 
    100100 
    101  
    102101int ifd_sysdep_usb_open(const char *device, int flags) 
    103102{ 
    104         return -1; 
     103        return -1; 
    105104} 
    106105 
  • trunk/src/ifd/sys-osx.c

    r750 r774  
    8989} 
    9090 
    91  
    9291int ifd_sysdep_usb_open(const char *device, int flags) 
    9392{ 
    94         return -1; 
     93        return -1; 
    9594} 
    9695 
  • trunk/src/ifd/sys-solaris.c

    r683 r774  
    8585                char *devstat; 
    8686 
    87                 if ((devstat = calloc(1,strlen(name) + 2)) == NULL) { 
     87                if ((devstat = calloc(1, strlen(name) + 2)) == NULL) { 
    8888                        ct_error("out of memory"); 
    8989                        return IFD_ERROR_NO_MEMORY; 
     
    304304        bytes_to_process = USB_REQUEST_SIZE + 
    305305            ((requesttype & USB_EP_DIR_MASK) == USB_EP_DIR_OUT ? len : 0); 
    306         if ((usb_control_req = calloc(1,bytes_to_process)) == NULL) { 
     306        if ((usb_control_req = calloc(1, bytes_to_process)) == NULL) { 
    307307                ct_error("out of memory"); 
    308308                return -1; 
    309309        } 
    310         if ((recv_data = calloc(1,len)) == NULL) { 
     310        if ((recv_data = calloc(1, len)) == NULL) { 
    311311                ct_error("out of memory"); 
    312312                free(usb_control_req); 
  • trunk/src/ifd/usb-descriptors.c

    r677 r774  
    115115        while (size > 0) { 
    116116                interface->altsetting = (struct ifd_usb_interface_descriptor *) 
    117                         realloc(interface->altsetting, 
    118                                 sizeof(struct ifd_usb_interface_descriptor) 
    119                                 * (interface-> num_altsetting + 1) 
    120                         ); 
     117                    realloc(interface->altsetting, 
     118                            sizeof(struct ifd_usb_interface_descriptor) 
     119                            * (interface->num_altsetting + 1) 
     120                    ); 
    121121                if (!interface->altsetting) { 
    122122                        ct_error("out of memory"); 
Note: See TracChangeset for help on using the changeset viewer.