diff options
author | Uwe Steinmann <steinm@php.net> | 2000-12-13 17:27:13 +0000 |
---|---|---|
committer | Uwe Steinmann <steinm@php.net> | 2000-12-13 17:27:13 +0000 |
commit | 0e41e3c7cfa369fd261dca2caf9ad7083da86b69 (patch) | |
tree | 246164db1e88eef113493414913ea64f8a54e590 /ext/hyperwave/hw.c | |
parent | a017a6c0257cfc4cf330851abdbf33769e0218cb (diff) | |
download | php-git-0e41e3c7cfa369fd261dca2caf9ad7083da86b69.tar.gz |
- Bodytag is insertet by fnInsAnchors()
- several small bugs which might cause a segm fault
Diffstat (limited to 'ext/hyperwave/hw.c')
-rw-r--r-- | ext/hyperwave/hw.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index 6fdad299d2..c5871c41f2 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -655,10 +655,12 @@ static char **make_strs_from_array(HashTable *arrht) { switch(data->type) { case IS_STRING: *ptr = estrdup(data->value.str.val); -fprintf(stderr, "carr[] = %s\n", *ptr); - ptr++; +/*fprintf(stderr, "carr[] = %s\n", *ptr); */ break; + default: + *ptr = NULL; } + ptr++; zend_hash_move_forward(arrht); } @@ -2819,7 +2821,12 @@ PHP_FUNCTION(hw_document_bodytag) { strcpy(temp+strlen(ptr->bodytag)-1+argv[1]->value.str.len, ">\n"); RETURN_STRING(temp, 0); } else { - RETURN_STRING(ptr->bodytag, 1); +//fprintf(stderr, "hw_document_bodytag: %s (%s)\n", ptr->bodytag, ptr->attributes); + if(ptr->bodytag) { + RETURN_STRING(ptr->bodytag, 1); + } else { + RETURN_EMPTY_STRING(); + } } } /* }}} */ @@ -4186,7 +4193,10 @@ PHP_FUNCTION(hw_insertanchors) { php_error(E_WARNING, "command (insertanchors) returned %d\n", error); RETURN_FALSE; } +/*fprintf(stderr, "in hw_insertanchors: %s\n", hwdoc->attributes); */ hwdoc->size = count; + if(hwdoc->bodytag) free (hwdoc->bodytag); + hwdoc->bodytag = bodytag; RETURN_TRUE; } |