Check-in [96244a5839]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Finish doxygen for module interfaces. Could write a main page, but theres probably no need.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:96244a58398849f154d085633c736673db93de95
User & Date: darrenbane 2014-02-07 15:14:09
Context
2014-02-07
16:28
Forgot to include own modules header file check-in: 63f34fd1ce user: darrenbane tags: trunk
15:14
Finish doxygen for module interfaces. Could write a main page, but theres probably no need. check-in: 96244a5839 user: darrenbane tags: trunk
2014-01-17
23:05
Further Doxygenation check-in: e935f89ffc user: darrenbane tags: trunk
Changes

Deleted hdr/ftypes.h.

     1         -/* (C) C.D.F. Miller, Heriot-Watt University, March 1984
     2         - *
     3         - *	Permission is hereby given to reproduce or modify this
     4         - *	software freely, provided that this notice be retained,
     5         - *	and that no use be made of the software for commercial
     6         - *	purposes without the express written permission of the
     7         - *	author.
     8         - */
     9         -
    10         -#ifndef _FTYPES_H_
    11         -#define _FTYPES_H_
    12         -
    13         -void	listdefs(void);
    14         -void	printl(label *, FILE *);
    15         -
    16         -#endif

Added hdr/list.h.

            1  +/** @file
            2  + * @brief Routines to list definitions in verbose mode.
            3  + */
            4  +
            5  +#ifndef _LIST_H_
            6  +#define _LIST_H_
            7  +
            8  +/**
            9  + * @brief List details of all labels, of all types, to stderr.
           10  + */
           11  +void	listdefs(void);
           12  +
           13  +#endif

Added hdr/printl.h.

            1  +/** @file
            2  + * @brief Routines to print a label according to a format.
            3  + */
            4  +
            5  +#ifndef _PRINTL_H_
            6  +#define _PRINTL_H_
            7  +
            8  +/**
            9  + * @brief Print a label.
           10  + * @param lab label to print.
           11  + * @param out file handle to output on.
           12  + */
           13  +void	printl(label *lab, FILE *out);
           14  +
           15  +#endif

Changes to hdr/types.h.

            1  +/** @file
            2  + * @brief Concrete data types.
            3  + * 
            4  + * On the one hand, having these all in the same file isn't
            5  + * good modularity. On the other hand, I don't want to write
            6  + * loads of setters and getters.
            7  + */
     1      8   /* (C) C.D.F. Miller, Heriot-Watt University, March 1984
     2      9    *
     3     10    *	Permission is hereby given to reproduce or modify this
     4     11    *	software freely, provided that this notice be retained,
     5     12    *	and that no use be made of the software for commercial
     6     13    *	purposes without the express written permission of the
     7     14    *	author.
................................................................................
     8     15    */
     9     16   
    10     17   #ifndef _TYPES_H_
    11     18   #define _TYPES_H_
    12     19   
    13     20   #include <sys/queue.h>
    14     21   
    15         -#define	rg		register
           22  +/** This used to be "register", but I think the compiler will
           23  + * do a better job. */
           24  +#define	rg
           25  +
           26  +/** @todo Remove this */
    16     27   #define	us		unsigned
    17     28   
    18         -/*** Header levels ***/
           29  +/** Max no. of header levels */
    19     30   #define	NLEVELS	20
           31  +
           32  +/** Type for header levels member of label struct */
    20     33   typedef us int levels[NLEVELS];
    21     34   
    22         -/*** Header format ***/
           35  +/** Header format */
    23     36   typedef char *format;
    24     37   
    25         -/*** Label type: name and current header levels ***/
           38  +/** Label type */
    26     39   typedef struct type {
    27         -	char   *t_name;
    28         -	levels	t_levels;
    29         -	format	t_format;
    30         -        LIST_HEAD(, label) labelhead;
    31         -        LIST_ENTRY(type) link;
           40  +	char   *t_name;	/**< name */
           41  +	levels	t_levels;	/**< current header levels */
           42  +	format	t_format;   /**< format */
           43  +        LIST_HEAD(, label) labelhead;   /**< list of labels of this type */
           44  +        LIST_ENTRY(type) link;  /**< next type in list of types */
    32     45   }	type;
    33     46   
    34         -/*** Label definition ***/
           47  +/** Label definition */
    35     48   typedef struct label {
    36         -	char   *l_name;
    37         -	type   *l_type;
    38         -	levels	l_levels;
    39         -	us int	l_bottom;		/* Last significant level */
    40         -	char   *l_file;			/* File where defined */
    41         -	long	l_line;			/* line   "      "    */
    42         -        LIST_ENTRY(label) link;
           49  +	char   *l_name; /**< Name */
           50  +	type   *l_type; /**< Back-reference to label type */
           51  +	levels	l_levels;   /**< Counter for label no. at different levels */
           52  +	us int	l_bottom;		/**< Last significant level */
           53  +	char   *l_file;			/**< File where defined */
           54  +	long	l_line;			/**< line where defined */
           55  +        LIST_ENTRY(label) link; /**< Next label in list of labels */
    43     56   }	label;
    44     57   
    45         -/*** Action routine ***/
           58  +/** Action routine for keyword processing */
    46     59   typedef int (*func) ();
    47     60   
    48         -/*** Command keyword ***/
           61  +/** Command keyword, to come after ".L=" at the start of an input line */
    49     62   typedef struct keyword {
    50         -	char   *k_name;
    51         -	func	k_action;
    52         -	us int	k_minargs;
    53         -	us int	k_maxargs;
           63  +	char   *k_name; /**< How is the keyword spelt */
           64  +	func	k_action;   /**< Function pointer for action to take */
           65  +	us int	k_minargs;  /**< Min no. of args for k_action */
           66  +	us int	k_maxargs;  /**< Max no. of args for k_action */
    54     67   }	keyword;
    55     68   
    56     69   #endif

Changes to src/list.c.

     3      3    *	Permission is hereby given to reproduce or modify this
     4      4    *	software freely, provided that this notice be retained,
     5      5    *	and that no use be made of the software for commercial
     6      6    *	purposes without the express written permission of the
     7      7    *	author.
     8      8    */
     9      9   
    10         -/* list.c:
    11         - *	list definitions in verbose mode
    12         - */
    13         -
    14     10   #include	<lbl.h>
    15     11   
    16     12   void	listtype(type *);
    17     13   
    18     14   extern char *def_format;
    19     15   extern LIST_HEAD(, type) typehead;
    20     16   

Changes to src/printl.c.

     3      3    *	Permission is hereby given to reproduce or modify this
     4      4    *	software freely, provided that this notice be retained,
     5      5    *	and that no use be made of the software for commercial
     6      6    *	purposes without the express written permission of the
     7      7    *	author.
     8      8    */
     9      9   
    10         -/* printl.c:
    11         - *	print a label according to a format
    12         - */
    13         -
    14     10   #include        <err.h>
    15     11   #include	<lbl.h>
    16     12   
    17     13   void	printr(char, us int, FILE *);
    18     14   static void printd(us int, FILE *);
    19     15   static void printa(char, us int, FILE *);
    20     16   static void auxprinta(char, us int, FILE *);