diff --git a/Makefile b/Makefile index 716a77d..2cc5271 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,7 @@ $(TOBJS): $(GDIR)/$(TDIR)/%.o: $(TDIR)/%.c $(H) $(DOCS): $(DDIR)/%.html: $(SDIR)/%.c $(SDIR)/%.h @mkdir -p $(DDIR) - -cat $^ | $(CDOCS) > $@ + -cat $^ | $(CDOC) > $@ ###### # phoney targets diff --git a/doc/Files.html b/doc/Files.html new file mode 100644 index 0000000..a1ae360 --- /dev/null +++ b/doc/Files.html @@ -0,0 +1,241 @@ + + + + + + + +Files + + + + + +

Files

+ + + +

+Copyright 2008, 2012 Neil Edelman, distributed under the terms of the + GNU General Public License, see copying.txt, or + https://opensource.org/licenses/GPL-3.0. +

+

+ Files is a list of File (private class defiend below,) the Files can have + a relation to other Files by 'parent' and 'favourite' (@(pwd) uses this.) +

+
+
author:
+
Neil
+
version:
+
0.9; 2017-03 fixed pedantic warnings
+
since:
+
0.8; 2013-07 case-insensitive sort + 0.7; 2012 sth.dsth.d handled properly + 0.6; 2008-03-24
+
+ + +

Declarations

+ +
+

struct Files

+
struct Files
+

+See Files. +

+
+
+
+ +
+

typedef int (*FilesFilter)(const struct Files *, const char *)

+
typedef int (*FilesFilter)(const struct Files *, const char *)
+

+Returns a boolean value. +

+
+
+
+ + +

Function Summary

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Return TypeFunction NameArgument List
struct Files *Filesconst struct Files *parent, const FilesFilter filter
voidFiles_struct Files *files
intFilesAdvancestruct Files *f
intFilesIsRootconst struct Files *f
voidFilesSetPathstruct Files *f
char *FilesEnumPathstruct Files *f
char *FilesNameconst struct Files *files
intFilesSizeconst struct Files *files
intFilesIsDirconst struct Files *files
+ + +

Function Detail

+ +
+

Files

+
struct Files * Files (const struct Files *parent, const FilesFilter filter)
+

+parent->this must be the 'file' (directory) that you want to create +

+
+
+
+ +
+

Files_

+
void Files_ (struct Files *files)
+

+Destructor. +

+
+
+
+ +
+

FilesAdvance

+
int FilesAdvance (struct Files *f)
+

+This is how we access the files sequentially. +

+
+
+
+ +
+

FilesIsRoot

+
int FilesIsRoot (const struct Files *f)
+

+Doesn't have a parent? +

+
+
+
+ +
+

FilesSetPath

+
void FilesSetPath (struct Files *f)
+

+Resets the list of favourites. +

+
+
+
+ +
+

FilesEnumPath

+
char * FilesEnumPath (struct Files *f)
+

+After FilesSetFarourite, this enumerates them. +

+
+
+
+ +
+

FilesName

+
char * FilesName (const struct Files *files)
+

+

+

+

+
+
return:
+
The file name of the selected file.
+
+
+ +
+

FilesSize

+
int FilesSize (const struct Files *files)
+

+

+

+

+
+
return:
+
File size of the selected file.
+
+
+ +
+

FilesIsDir

+
int FilesIsDir (const struct Files *files)
+

+

+

+

+
+
return:
+
Whether the file is a directory.
+
+
+ + + + diff --git a/doc/Parser.html b/doc/Parser.html new file mode 100644 index 0000000..51c7d8a --- /dev/null +++ b/doc/Parser.html @@ -0,0 +1,90 @@ + + + + + + + + + + + + + +

+ + + +
+
+ + +

Declarations

+ + +

Function Summary

+ + + + + + + + + + + + + +
Return TypeFunction NameArgument List
const struct Symbol *matchconst char *str, const char *end
intParserParsestruct Parser *p, const struct Files *f, int invisible, FILE *fp
+ + +

Function Detail

+ +
+

match

+
const struct Symbol * match (const char *str, const char *end)
+

+binary search +

+
+
+
+ +
+

ParserParse

+
int ParserParse (struct Parser *p, const struct Files *f, int invisible, FILE *fp)
+

+parse, called recusively (invisible, hack) fixme: this fn needs rewriting, messy +

+
+
+
+ + + + diff --git a/doc/Recursor.html b/doc/Recursor.html new file mode 100644 index 0000000..7271a25 --- /dev/null +++ b/doc/Recursor.html @@ -0,0 +1,90 @@ + + + + + + + + + + + + + +

+ + + +

+Copyright 2008, 2012 Neil Edelman, distributed under the terms of the + GNU General Public License, see copying.txt +

+

+ This is the main program. I didn't know what to call it. +

+
+
author:
+
Neil
+
version:
+
1.0; 2016-09-19 Added umask
+
since:
+
1.0; 2008-03-27
+
+ + +

Declarations

+ + +

Function Summary

+ + + + + + + + +
Return TypeFunction NameArgument List
} +voidusageconst char *programme
+ + +

Function Detail

+ +
+

usage

+
}
+void usage (const char *programme)
+

+you must free() the memory! +

+
+
+
+ + + + diff --git a/doc/Widget.html b/doc/Widget.html new file mode 100644 index 0000000..57ce3f3 --- /dev/null +++ b/doc/Widget.html @@ -0,0 +1,60 @@ + + + + + + + + + + + + + +

+ + + +
+
+ + +

Declarations

+ + +

Function Summary

+ + + +
Return TypeFunction NameArgument List
+ + +

Function Detail

+ + + + diff --git a/src/Files.c b/src/Files.c index a16cd8e..5cf7805 100644 --- a/src/Files.c +++ b/src/Files.c @@ -1,4 +1,4 @@ -/* Copyright 2008, 2012 Neil Edelman, distributed under the terms of the +/** Copyright 2008, 2012 Neil Edelman, distributed under the terms of the GNU General Public License, see copying.txt, or \url{ https://opensource.org/licenses/GPL-3.0 }. @@ -7,9 +7,10 @@ @file Files @author Neil - @version 0.9; 2017-03 - @since 0.8; 2012 - 0.8; 2008-03-24 */ + @version 0.9; 2017-03 fixed pedantic warnings + @since 0.8; 2013-07 case-insensitive sort + 0.7; 2012 sth.dsth.d handled properly + 0.6; 2008-03-24 */ #include /* malloc free */ #include /* fprintf */ diff --git a/src/Files.h b/src/Files.h index 4053b00..de6ecd6 100644 --- a/src/Files.h +++ b/src/Files.h @@ -1,4 +1,4 @@ -/** \see{Files}. */ +/** See \see{Files}. */ struct Files; struct Recursor;