diff --git a/sefht.geany b/sefht.geany index ece6a791b2dd21666dc0ea9f93e7a8fcb3ac9ab1..34d4c1327e24fce377ce74ff15dfa7ea4789069d 100644 --- a/sefht.geany +++ b/sefht.geany @@ -28,20 +28,20 @@ long_line_behaviour=1 long_line_column=72 [files] -current_page=22 +current_page=12 FILE_NAME_0=923;Sh;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fconfigure.ac;0;8 FILE_NAME_1=73;Make;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2FMakefile.am;0;8 FILE_NAME_2=1082;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Fmain.c;0;8 FILE_NAME_3=640;Make;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2FMakefile.am;0;8 -FILE_NAME_4=1381;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fcms.c;0;8 +FILE_NAME_4=1502;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fcms.c;0;8 FILE_NAME_5=1359;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fcms.h;0;8 -FILE_NAME_6=4939;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fdata.c;0;8 +FILE_NAME_6=5079;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fdata.c;0;8 FILE_NAME_7=1376;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fdata.h;0;8 -FILE_NAME_8=1171;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Ffragment.c;0;8 -FILE_NAME_9=2843;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Ffragment.h;0;8 -FILE_NAME_10=1609;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fnode_fragment.c;0;8 +FILE_NAME_8=1733;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Ffragment.c;0;8 +FILE_NAME_9=3029;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Ffragment.h;0;8 +FILE_NAME_10=7437;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fnode_fragment.c;0;8 FILE_NAME_11=3013;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fnode_fragment.h;0;8 -FILE_NAME_12=3572;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Ftext.c;0;8 +FILE_NAME_12=24630;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Ftext.c;0;8 FILE_NAME_13=1833;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Ftext.h;0;8 FILE_NAME_14=1520;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fvalidator.c;0;8 FILE_NAME_15=1503;C;0;EUTF-8;1;1;0;%2Fhome%2Fjonathan%2FDokumente%2Fprojekte%2Fprgm%2Finternet%2Fweb%2FSeFHT%2Fsrc%2Flib%2Fsefht%2Fvalidator.h;0;8 diff --git a/src/lib/sefht/cms.c b/src/lib/sefht/cms.c index eae574d15b693f86de4769025231894a2e09ffa0..26a16fe6b0a767aa82340a4a5bca57fad6dc80c2 100644 --- a/src/lib/sefht/cms.c +++ b/src/lib/sefht/cms.c @@ -73,7 +73,7 @@ SH_Cms_free (struct SH_Cms * cms) page_t SH_Cms_register_page (struct SH_Cms * cms, const char * name, - struct SH_Status * status) + struct SH_Status * status) { return SH_Data_register_page (cms->data, name, status); } diff --git a/src/lib/sefht/data.c b/src/lib/sefht/data.c index 20eee7c059d87491fd3748a06f7feb7f964a291f..3105e2b49a469b85059c705ceef056c2bb3c2685 100644 --- a/src/lib/sefht/data.c +++ b/src/lib/sefht/data.c @@ -38,7 +38,7 @@ static inline bool init_validator (struct SH_Data * data, - struct SH_Status * status); + struct SH_Status * status); static inline void init_pages (struct SH_Data * data); struct SH_Data * @@ -154,7 +154,7 @@ free_pages (struct SH_Data * data) page_t SH_Data_register_page (struct SH_Data * data, const char * name, - struct SH_Status * status) + struct SH_Status * status) { /* abort on overflow */ if (data->page_n == UINT_MAX || data->last_page == PAGE_MAX) @@ -166,7 +166,8 @@ SH_Data_register_page (struct SH_Data * data, const char * name, } data->pages = realloc (data->pages, - (data->page_n + 1) * sizeof (struct SH_Page)); + sizeof (struct SH_Page) + * (data->page_n + 1)); if (data->pages == NULL) { diff --git a/src/lib/sefht/fragment.c b/src/lib/sefht/fragment.c index ba60b4c7608e8a5c22bba53baa8de47944590c7d..d760ba8902b54b1abe015125c9fd1cd85a39a37f 100644 --- a/src/lib/sefht/fragment.c +++ b/src/lib/sefht/fragment.c @@ -33,7 +33,7 @@ struct SH_Fragment * SH_Fragment_copy (struct SH_Fragment * fragment, - struct SH_Status * status) + struct SH_Status * status) { return fragment->methods->copy (fragment, status); } @@ -46,15 +46,15 @@ SH_Fragment_free (struct SH_Fragment * fragment) struct SH_Text * SH_Fragment_to_html (struct SH_Fragment * fragment, - enum HTML_MODE mode, - unsigned int indent_base, - unsigned int indent_step, - char * indent_char, - struct SH_Status * status) + enum HTML_MODE mode, + unsigned int indent_base, + unsigned int indent_step, + char * indent_char, + struct SH_Status * status) { return fragment->methods->to_html (fragment, mode, - indent_base, - indent_step, - indent_char, - status); + indent_base, + indent_step, + indent_char, + status); } diff --git a/src/lib/sefht/fragment.h b/src/lib/sefht/fragment.h index db3a035be086a9b0119f012691c2d065ea66d0f4..5eae3d54b589530c539c885f3b0ba96c4bdc45cb 100644 --- a/src/lib/sefht/fragment.h +++ b/src/lib/sefht/fragment.h @@ -62,25 +62,25 @@ struct SH_Fragment struct fragment_methods { struct SH_Fragment * (*copy) (struct SH_Fragment *, - struct SH_Status *); + struct SH_Status *); void (*free) (struct SH_Fragment *); struct SH_Text * (*to_html) (struct SH_Fragment *, - enum HTML_MODE, - unsigned int, - unsigned int, - const char *, - struct SH_Status *); + enum HTML_MODE, + unsigned int, + unsigned int, + const char *, + struct SH_Status *); }; static inline void init_fragment (struct SH_Fragment * fragment, - struct SH_Data * data, - const enum SH_FRAGMENT_TYPE type, - const struct fragment_methods * const methods) + struct SH_Data * data, + const enum SH_FRAGMENT_TYPE type, + const struct fragment_methods * const methods) { fragment->data = data; fragment->type = type; @@ -99,7 +99,7 @@ free_fragment (struct SH_Fragment * fragment) static inline void copy_fragment (struct SH_Fragment * copy, - struct SH_Fragment * fragment) + struct SH_Fragment * fragment) { copy->data = fragment->data; copy->type = fragment->type; diff --git a/src/lib/sefht/node_fragment.c b/src/lib/sefht/node_fragment.c index 2c274fbcf878c7232de10ff0707cfe346f70bd22..c899c2aec7ae9c606daec7f82b2fcade105ce449 100644 --- a/src/lib/sefht/node_fragment.c +++ b/src/lib/sefht/node_fragment.c @@ -42,22 +42,22 @@ static const struct fragment_methods methods = { (struct SH_Fragment * (*)(struct SH_Fragment *, - struct SH_Status *)) + struct SH_Status *)) SH_NodeFragment_deepcopy, (void (*)(struct SH_Fragment *)) SH_NodeFragment_free, (struct SH_Text * (*)(struct SH_Fragment *, enum HTML_MODE, - unsigned int, unsigned int, const char *, - struct SH_Status *)) + unsigned int, unsigned int, const char *, + struct SH_Status *)) SH_NodeFragment_to_html }; struct SH_Fragment * SH_NodeFragment_new (const char * tag, struct SH_Data * data, - struct SH_Status * status) + struct SH_Status * status) { struct SH_NodeFragment * fragment; @@ -116,7 +116,7 @@ SH_NodeFragment_free (struct SH_NodeFragment * fragment) struct SH_Fragment * SH_NodeFragment_copy (struct SH_NodeFragment * fragment, - struct SH_Status * status) + struct SH_Status * status) { struct SH_NodeFragment * copy; @@ -155,7 +155,7 @@ SH_NodeFragment_copy (struct SH_NodeFragment * fragment, struct SH_Fragment * SH_NodeFragment_deepcopy (struct SH_NodeFragment * fragment, - struct SH_Status * status) + struct SH_Status * status) { struct SH_NodeFragment * copy; struct SH_Fragment * child; @@ -188,7 +188,7 @@ SH_NodeFragment_deepcopy (struct SH_NodeFragment * fragment, copy->child_n = fragment->child_n; copy->childs = malloc (sizeof (struct SH_NodeFragment *) - * fragment->child_n); + * fragment->child_n); if (copy->child_n != 0 && copy->childs == NULL) { @@ -205,7 +205,7 @@ SH_NodeFragment_deepcopy (struct SH_NodeFragment * fragment, for (index = 0; index < fragment->child_n; index++) { child = SH_Fragment_copy (fragment->childs[index], - status); + status); if (child == NULL) { @@ -231,7 +231,7 @@ SH_Fragment_is_NodeFragment (struct SH_Fragment * fragment) char * SH_NodeFragment_get_tag (struct SH_NodeFragment * fragment, - struct SH_Status * status) + struct SH_Status * status) { char * tag; @@ -271,7 +271,7 @@ SH_NodeFragment_get_child (struct SH_NodeFragment * fragment, bool SH_NodeFragment_is_child (struct SH_NodeFragment * fragment, - struct SH_Fragment * child) + struct SH_Fragment * child) { size_t index; @@ -296,9 +296,9 @@ SH_NodeFragment_is_descendant (struct SH_NodeFragment * fragment, if (fragment->childs[index] == child || (SH_Fragment_is_NodeFragment (child) && SH_NodeFragment_is_descendant ( - (struct SH_NodeFragment *) - fragment->childs[index], - child))) + (struct SH_NodeFragment *) + fragment->childs[index], + child))) { return TRUE; } @@ -308,12 +308,12 @@ SH_NodeFragment_is_descendant (struct SH_NodeFragment * fragment, bool SH_NodeFragment_append_child (struct SH_NodeFragment * fragment, - struct SH_Fragment * child, - struct SH_Status * status) + struct SH_Fragment * child, + struct SH_Status * status) { fragment->childs = realloc (fragment->childs, - sizeof (struct SH_Fragment *) - * (fragment->child_n + 1)); + sizeof (struct SH_Fragment *) + * (fragment->child_n + 1)); if (fragment->childs == NULL) { @@ -334,11 +334,11 @@ SH_NodeFragment_append_child (struct SH_NodeFragment * fragment, struct SH_Text * SH_NodeFragment_to_html (struct SH_NodeFragment * fragment, - enum HTML_MODE mode, - unsigned int indent_base, - unsigned int indent_step, - char * indent_char, - struct SH_Status * status) + enum HTML_MODE mode, + unsigned int indent_base, + unsigned int indent_step, + char * indent_char, + struct SH_Status * status) { struct SH_Text * html; struct SH_Text * child; @@ -363,8 +363,8 @@ SH_NodeFragment_to_html (struct SH_NodeFragment * fragment, for (index = 0; index < indent_base; index++) { if (!SH_Text_append_string (indent_text, - indent_char, - status)) + indent_char, + status)) { SH_Text_free (html); SH_Text_free (indent_text); diff --git a/src/lib/sefht/node_fragment.h b/src/lib/sefht/node_fragment.h index 10e06ba79a817afd62fa9e774005d7056a81334d..38d3ebe9550905e990bbb564161cbbb3031a3a46 100644 --- a/src/lib/sefht/node_fragment.h +++ b/src/lib/sefht/node_fragment.h @@ -104,7 +104,7 @@ SH_NodeFragment_is_descendant (SH_NodeFragment * fragment, bool SH_NodeFragment_append_child (SH_NodeFragment * fragment, - SH_Fragment * child, + SH_Fragment * child, struct SH_Status * status); SH_Text * diff --git a/src/lib/sefht/text.c b/src/lib/sefht/text.c index 891d5a057c03b2b72727160c0da705ed96446893..2bad83d76f9fe4d86959cf0a43e29ef281ad7847 100644 --- a/src/lib/sefht/text.c +++ b/src/lib/sefht/text.c @@ -752,7 +752,7 @@ SH_Text_get_range (const struct SH_Text * text, } /* Allocate the string to be returned. The multiplication is - * save, as long is sizeof (char) == 1. (Should be ...) */ + * save, as long as sizeof (char) == 1. (Should be ...) */ string = malloc ((len + 1) * sizeof (char)); /* Allocating has failed. Nothing has to be freed, because we