Changeset 4679

Show
Ignore:
Timestamp:
08/16/07 19:49:50 (1 year ago)
Author:
khali
Message:

Typo and white space cleanps.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/lib/data.c

    r4098 r4679  
    6464   address, and '10dd' any hexadecimal isa address. 
    6565 
    66    If '*' is used in prefixes, together with dashes, ambigious parses are 
     66   If '*' is used in prefixes, together with dashes, ambiguous parses are 
    6767   introduced. In that case, the prefix is kept as small as possible. 
    6868 
     
    8282  /* Play it safe */ 
    8383  res->busname = NULL; 
    84    
     84 
    8585  if (! name) 
    8686    sensors_fatal_error("sensors_parse_chip_name","Allocating new name"); 
     
    9090  if ((part3 = strrchr(name,'-'))) 
    9191    *part3++ = '\0'; 
    92   if ((part2 = strrchr(name,'-')))  
     92  if ((part2 = strrchr(name,'-'))) 
    9393    *part2++ = '\0'; 
    9494 
     
    100100      res->addr = SENSORS_CHIP_NAME_ADDR_ANY; 
    101101      goto SUCCES; 
    102     } else  
     102    } else 
    103103      goto ERROR; 
    104104  } 
     
    111111      goto ERROR; 
    112112    res->addr = 0; 
    113     for (i = 0; ; i++) {  
     113    for (i = 0; ; i++) { 
    114114      switch (part4[i]) { 
    115115      case '0': case '1': case '2': case '3': case '4': 
     
    155155      goto ERROR; 
    156156    res->bus = 0; 
    157     for (i = 0; ; i++) {  
     157    for (i = 0; ; i++) { 
    158158      switch (part3[i]) { 
    159159      case '0': case '1': case '2': case '3': case '4': 
     
    179179  } else 
    180180    goto ERROR; 
    181      
     181 
    182182  if (!strcmp(name,"*")) 
    183183    res->prefix = SENSORS_CHIP_NAME_PREFIX_ANY; 
    184184  else if (! (res->prefix = strdup(name))) 
    185     sensors_fatal_error("sensors_parse_chip_name","Allocating new name"); 
     185    sensors_fatal_error("sensors_parse_chip_name", "Allocating name prefix"); 
    186186  goto SUCCES; 
    187187 
     
    211211    return -SENSORS_ERR_BUS_NAME; 
    212212  *res = 0; 
    213   for (i = 0; ; i++) {  
     213  for (i = 0; ; i++) { 
    214214    switch (name[i]) { 
    215215    case '0': case '1': case '2': case '3': case '4': 
     
    256256} 
    257257 
    258        
     258 
    259259int sensors_substitute_busses(void) 
    260260{ 
     
    262262  sensors_chip_name_list *chips; 
    263263  int res=0; 
    264    
     264 
    265265  for(i = 0; i < sensors_config_chips_count; i++) { 
    266266    lineno = sensors_config_chips[i].lineno; 
  • lm-sensors/trunk/lib/sensors.h

    r4641 r4679  
    3737#endif /* __cplusplus */ 
    3838 
    39 /* A chip name is encoded is in this structure */ 
     39/* A chip name is encoded in this structure */ 
    4040typedef struct sensors_chip_name { 
    4141  char *prefix; 
     
    4545} sensors_chip_name; 
    4646 
    47 /* (Re)load the configuration file and the detected chips list. If this  
     47/* (Re)load the configuration file and the detected chips list. If this 
    4848    returns a value unequal to zero, you are in trouble; you can not 
    4949    assume anything will be initialized properly. */ 
     
    5454extern void sensors_cleanup(void); 
    5555 
    56 /* Parse a chip name to the internal representation. Return 0 on succes, <0 
     56/* Parse a chip name to the internal representation. Return 0 on success, <0 
    5757   on error. */ 
    5858extern int sensors_parse_chip_name(const char *orig_name, 
     
    6161/* Compare two chips name descriptions, to see whether they could match. 
    6262   Return 0 if it does not match, return 1 if it does match. */ 
    63 extern int sensors_match_chip(sensors_chip_name chip1,  
     63extern int sensors_match_chip(sensors_chip_name chip1, 
    6464                              sensors_chip_name chip2); 
    6565 
     
    7070 
    7171/* This function returns the adapter name of a bus number, 
    72    as used within the sensors_chip_name structure. If it could not be found,  
     72   as used within the sensors_chip_name structure. If it could not be found, 
    7373   it returns NULL */ 
    7474extern const char *sensors_get_adapter_name(int bus_nr); 
     
    8181   This function will return 0 on success, and <0 on failure.  This 
    8282   function takes logical mappings into account. */ 
    83 extern int sensors_get_label(sensors_chip_name name, int feature,  
     83extern int sensors_get_label(sensors_chip_name name, int feature, 
    8484                             char **result); 
    8585 
     
    111111/* This function returns all detected chips, one by one. To start at the 
    112112   beginning of the list, use 0 for nr; NULL is returned if we are 
    113    at the end of the list. Do not try to change these chip names, as  
     113   at the end of the list. Do not try to change these chip names, as 
    114114   they point to internal structures! Do not use nr for anything else. */ 
    115115extern const sensors_chip_name *sensors_get_detected_chips(int *nr); 
     
    136136} sensors_feature_data; 
    137137 
    138 /* This returns all features of a specific chip. They are returned in  
     138/* This returns all features of a specific chip. They are returned in 
    139139   bunches: everything with the same mapping is returned just after each 
    140140   other, with the master feature in front (that feature does not map to 
     
    144144   Do not try to change the returned structure; you will corrupt internal 
    145145   data structures. */ 
    146 extern const sensors_feature_data *sensors_get_all_features  
     146extern const sensors_feature_data *sensors_get_all_features 
    147147             (sensors_chip_name name, int *nr1,int *nr2); 
    148148