Skip to content
Browse files

Tag handling tweaks.

  • Loading branch information...
1 parent 2de2ac1 commit f62031377e6c39619dbd3983270e661ef13e940e @cataphract committed Oct 4, 2011
Showing with 16 additions and 23 deletions.
  1. +6 −16 lib/setup.c
  2. +9 −5 lib/tags.c
  3. +1 −2 lib/tags.h
View
22 lib/setup.c
@@ -48,23 +48,17 @@ void mkd_tags_on_shutdown(SHUTDOWN_FUNC_ARGS)
void
mkd_initialize()
{
- /* on merge: added critical section */
-#ifdef ZTS
+ /* on merge: nothing needed */
+/*#ifdef ZTS
tsrm_mutex_lock(tags_mutex);
-#endif
- /* on merge: reduced to call to mkd_prepare_tags(); */
+#endif*/
/* if ( need_to_initrng ) {
need_to_initrng = 0;
INITRNG(time(0));
- }
- if ( need_to_setup ) {
- need_to_setup = 0;*/
- mkd_prepare_tags();
- /*}*/
-
-#ifdef ZTS
+ }*/
+/*#ifdef ZTS
tsrm_mutex_unlock(tags_mutex);
-#endif
+#endif*/
}
@@ -75,11 +69,7 @@ mkd_shlib_destructor()
#ifdef ZTS
tsrm_mutex_lock(tags_mutex);
#endif
- /* on merge: reduced to call to mkd_deallocate_tags(); */
- /*if ( !need_to_setup ) {
- need_to_setup = 1;*/
mkd_deallocate_tags();
- /*}*/
#ifdef ZTS
tsrm_mutex_unlock(tags_mutex);
#endif
View
14 lib/tags.c
@@ -20,22 +20,24 @@ static STRING(struct kw) extratags;
/* define an additional html block tag
*/
-/* on merge: made static because html5.c is commented out */
+/* on merge: commented out because html5.c is commented out */
+/*
static void
mkd_define_tag(char *id, int selfclose)
{
struct kw *p;
- /* only add the new tag if it doesn't exist in
+ *//* only add the new tag if it doesn't exist in
* either the standard or extra tag tables.
- */
+ *//*
if ( !(p = mkd_search_tags(id, strlen(id))) ) {
- p = &EXPAND_PERMANENT(extratags); /* in merge permanent */
+ p = &EXPAND_PERMANENT(extratags); *//* in merge permanent *//*
p->id = id;
p->size = strlen(id);
p->selfclose = selfclose;
}
}
+*/
/* case insensitive string sort (for qsort() and bsearch() of block tags)
@@ -57,12 +59,14 @@ typedef int (*stfu)(const void*,const void*);
/* sort the list of extra html block tags for later searching
*/
-/* on merge: made static because html5.c is commented out */
+/* on merge: commented out because html5.c is commented out */
+/*
static void
mkd_sort_tags()
{
qsort(T(extratags), S(extratags), sizeof(struct kw), (stfu)casort);
}
+*/
/* look for a token in the html block tag list
View
3 lib/tags.h
@@ -11,9 +11,8 @@ struct kw {
struct kw* mkd_search_tags(char *, int);
-void mkd_prepare_tags();
void mkd_deallocate_tags();
-/* on merge: these were made static */
+/* on merge: these were deleted */
/*void mkd_sort_tags();*/
/*void mkd_define_tag(char *, int);*/

0 comments on commit f620313

Please sign in to comment.
Something went wrong with that request. Please try again.