From 52fc1ceef8782c29a1cb49dc1f398c625a928aa1 Mon Sep 17 00:00:00 2001
From: Neil Edelman
Date: Sun, 26 Mar 2017 22:00:13 -0400
Subject: [PATCH] Version 1.1: fixed all pedantic warnings; cdoc documented.
---
doc/Files.html | 14 +++----
doc/Parser.html | 96 +++++++++++++++++++++++++++++++++++++++++++++--
doc/Recursor.html | 52 ++++++++++++-------------
doc/Widget.html | 34 ++++++++++++++++-
src/Files.c | 21 +++++++----
src/Files.h | 4 +-
src/Parser.c | 9 +++--
src/Parser.h | 4 +-
src/Recursor.c | 79 ++++++++++++++++++++++++++++++--------
src/Widget.c | 9 +++--
10 files changed, 245 insertions(+), 77 deletions(-)
diff --git a/doc/Files.html b/doc/Files.html
index 4cfb7a0..b798cfb 100644
--- a/doc/Files.html
+++ b/doc/Files.html
@@ -50,7 +50,7 @@ a relation to other Files by 'parent' and 'favourite' (@(pwd) uses this.)
- minimum standard
- - POSIX
+ - POSIX.1
- author
- Neil
- version
@@ -72,11 +72,11 @@ See Files.
-
-
typedef int (*FilesFilter)(struct Files *const, const char *)
-
typedef int (*FilesFilter)(struct Files *const, const char *)
+
+
typedef int (*FilesFilter)(struct Files *const files, const char *file)
+
typedef int (*FilesFilter)(struct Files *const files, const char *file)
-Returns a boolean value.
+Returns a boolean value on whether files should include file.
@@ -197,7 +197,7 @@ Resets the list of favourites.
const char * FilesEnumPath (struct Files *const files)
- return
- - After FilesSetFarourite, this enumerates them.
+ - After FilesSetPath, this enumerates them.
@@ -215,7 +215,7 @@ Resets the list of favourites.
int FilesSize (const struct Files *files)
- return
- - File size of the selected file.
+ - File size of the selected file in KB.
diff --git a/doc/Parser.html b/doc/Parser.html
index 94e5c8e..421931e 100644
--- a/doc/Parser.html
+++ b/doc/Parser.html
@@ -25,13 +25,13 @@
padding: 4px;
}
-
+Parser
-
+Parser
+
+Copyright 2008, 2012 Neil Edelman, distributed under the terms of the
+GNU General Public License, see copying.txt
+
+
+Parsing of strings. '~' on a line by itself is recognised in ".newsfile.rss"
+and ".sitemap.xml" as a <head>~<body>~<tail>; there should be two of them.
+
+
+Parsed in ".index.html",
+
+
+ -
+@(content) prints content.d, or, if it is missing, index.d;
+
+ -
+@(files){} repeats for all the files in the directory the contents of the
+argument;
+
+ -
+@(htmlcontent);
+
+ -
+@(pwd){} prints the directory, the argument is the separator;
+eg, @(pwd){/};
+
+ -
+@(root){}, like @(pwd), except up instead of down;
+
+ -
+@(now) prints the date and the time in UTC.
+
+
+
+Further parsed in @(files) in ".index.html",
+
+
+ -
+@(filealt) prints Dir or File;
+
+ -
+@(filedesc);
+
+ -
+@(filehref) prints the filename or the .link;
+
+ -
+@(fileicon) prints it's .d.jpeg, or if it is not there, dir.jpeg or
+file.jpeg;
+
+ -
+@(filename) prints the file name;
+
+ -
+@(filesize) prints the file size, if it exits;
+
+ -
+@(now) prints the date and the time in UTC.
+
+
+
+Parsed in ".newsfeed.rss",
+
+
+ -
+@(date) prints the date on the news file;
+
+ -
+@(news) prints the contents of the file (as a text file);
+
+ -
+@(newsname) prints the filename of the news story;
+
+ -
+@(now) prints the date and the time in UTC;
+
+ -
+@(title) prints the second line in the .news.
+
+
+ - minimum standard
+ - C89/90
+ - author
+ - Neil
+ - version
+ - 1.1; 2017-03 fixed pedantic warnings; command-line improvements
+ - since
+ - 0.6; 2008-03-21
@@ -59,7 +147,7 @@ See Parser.
struct Files
struct Files
-Dependancy on Files
+Dependancy on Files.
@@ -69,7 +157,7 @@ Dependancy on Files
typedef int (*ParserWidget)(struct Files *const files, FILE *const fp)
typedef int (*ParserWidget)(struct Files *const files, FILE *const fp)
-All ParserWidgets are in Widget.c
+All ParserWidgets are in Widget.c.
diff --git a/doc/Recursor.html b/doc/Recursor.html
index df2e430..bc8b6f5 100644
--- a/doc/Recursor.html
+++ b/doc/Recursor.html
@@ -25,13 +25,13 @@
padding: 4px;
}
-Parser
+Recursor
-Parser
+Recursor
- Declarations
@@ -44,12 +44,12 @@ Copyright 2008, 2012 Neil Edelman, distributed under the terms of the
GNU General Public License, see copying.txt
-MakeIndex is a simple content management system that generates static
-content, (mostly index.html,) on all the directories rooted at the directory
-specified by the argument. It is based on a template file, ".index.html" and
-".newsfeed.rss". Also included are files to summarise the directory structure
-for a xml site map, compatible with Google, and any .news for an rss
-feed. It takes one argument, <directory>, which is the root of the recursion.
+Recusor is the main part of MakeIndex, a content management system that
+generates static content, (mostly index.html,) on all the directories rooted
+at the directory specified by the argument. It is based on a template file,
+".index.html" and ".newsfeed.rss". Also included are files to summarise the
+directory structure for a xml site map, compatible with Google, and any
+.news for an rss feed.
There should be an <example> directory that has a bunch of files in it. Run
@@ -102,7 +102,7 @@ If this is not the case, the constants are in Files.c.
- minimum standard
- - POSIX
+ - POSIX.1
- author
- Neil
- version
@@ -117,7 +117,7 @@ If this is not the case, the constants are in Files.c.
- fixme
- Have a subset of LaTeX converted into html for the .d files?
- fixme
- - Encoding is an issue; especially the newsfeed, 7bit.
+ - Encoding is an issue; especially the newsfeed, which requires 7-bit.
- fixme
- It's not robust; eg @(files)@(files){Don't do this.}.
@@ -146,15 +146,13 @@ See Recursor.
const char *idx, const char *map, const char *news |
- int |
- RecursorGo |
+ void |
+ Recursor_ |
void |
- }
-
-static void |
- usage |
+ int |
+ RecursorGo |
void |
@@ -175,6 +173,16 @@ static void
+
+
Recursor_
+
void Recursor_ (void)
+
+Destructor.
+
+
+
+
+
RecursorGo
int RecursorGo (void)
@@ -185,18 +193,6 @@ Actually does the recursion.
-
-
usage
-
}
-
-static void usage (void)
-
-you must free() the memory!
-
-
-
-
-