Changeset 95

Show
Ignore:
Timestamp:
12/20/98 17:54:03 (10 years ago)
Author:
frodo
Message:

More library files

This brings the archive into synch with my harddisk...

Everything in the lib directory should compile without problems (yes, even
without warnings even if WARN=1). It is not well-tested, though, and there
are some minor functions which must still be added. It is now almost
usable.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/lib/Module.mk

    r93 r95  
    3636 
    3737LIBCSOURCES := $(MODULE_DIR)/data.c $(MODULE_DIR)/general.c \ 
    38                $(MODULE_DIR)/error.c $(MODULE_DIR)/chips.c 
     38               $(MODULE_DIR)/error.c $(MODULE_DIR)/chips.c \ 
     39               $(MODULE_DIR)/proc.c $(MODULE_DIR)/access.c 
    3940LIBOTHEROBJECTS := $(MODULE_DIR)/conf-parse.o $(MODULE_DIR)/conf-lex.o 
    4041LIBSHOBJECTS := $(LIBCSOURCES:.c=.lo) $(LIBOTHEROBJECTS:.o=.lo) 
    4142LIBSTOBJECTS := $(LIBCSOURCES:.c=.ao) $(LIBOTHEROBJECTS:.o=.ao) 
     43LIBEXTRACLEAN := $(MODULE_DIR)/conf_parse.h 
    4244 
    43 LIBHEADERFILES := $(MODULE_DIR)/error.h 
     45LIBHEADERFILES := $(MODULE_DIR)/error.h $(MODULE_DIR)/sensors.h 
    4446 
    4547# How to create the shared library 
     
    7678        $(RM) $(LIBTARGETS) $(LIBSHOBJECTS) $(LIBSTOBJECTS) 
    7779        $(RM) $(LIBSHOBJECTS:.lo=.ld) $(LIBSTOBJECTS:.ao=.ad) 
    78         $(RM) $(LIBOTHEROBJECTS:.o=.c) $(MODULE_DIR)/conf-parse.h 
     80        $(RM) $(LIBOTHEROBJECTS:.o=.c) $(LIBEXTRACLEAN) 
    7981clean :: clean-lib 
  • lm-sensors/trunk/lib/access.h

    r93 r95  
    2020#ifndef LIB_SENSORS_ACCESS_H 
    2121#define LIB_SENSORS_ACCESS_H 
     22 
     23#include "sensors.h" 
     24#include "data.h" 
    2225 
    2326typedef struct sensors_chip_feature { 
     
    4649extern sensors_chip_features sensors_chip_features_list[]; 
    4750 
     51/* Returns, one by one, a pointer to all sensor_chip structs of the 
     52   config file which match with the given chip name. Last should be 
     53   the value returned by the last call, or NULL if this is the first 
     54   call. Returns NULL if no more matches are found. Do not modify 
     55   the struct the return value points to! 
     56   Note that this visits the list of chips from last to first. Usually, 
     57   you want the match that was latest in the config file. */ 
     58extern sensors_chip *sensors_for_all_config_chips(sensors_chip_name chip_name, 
     59                                                  sensors_chip *last); 
     60 
     61/* Look up a resource in the intern chip list, and return a pointer to it. 
     62   Do not modify the struct the return value points to! Returns NULL if 
     63   not found. */ 
     64extern sensors_chip_feature *sensors_lookup_feature_nr(const char *prefix, 
     65                                                       int feature); 
     66 
     67/* Look up a resource in the intern chip list, and return a pointer to it. 
     68   Do not modify the struct the return value points to! Returns NULL if 
     69   not found.*/ 
     70extern sensors_chip_feature *sensors_lookup_feature_name(const char *prefix, 
     71                                                         const char *feature); 
     72 
    4873#endif /* def LIB_SENSORS_ACCESS_H */ 
  • lm-sensors/trunk/lib/chips.c

    r93 r95  
    3636 
    3737 
    38 #define VALUE(x) (x-1) * sizeof(double
     38#define VALUE(x) (x-1) * sizeof(long
    3939 
    4040static sensors_chip_feature lm78_features[] = 
  • lm-sensors/trunk/lib/general.c

    r91 r95  
    1818*/ 
    1919 
     20#include "error.h" 
    2021#include "general.h" 
    2122#include <errno.h>