cvs: /php4/ext/hyperwave hg_comm.c hw.c

From: Date: Tue, 19 Oct 1999 13:55:15 +0000
Subject: cvs: /php4/ext/hyperwave hg_comm.c hw.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-5570@lists.php.net to get a copy of this message
steinm Tue Oct 19 09:55:15 1999 EDT Modified files: /php4/ext/hyperwave hg_comm.c hw.c Log: - some tiny changes to possible improve link extraction/insertion of HTML-docs Index: php4/ext/hyperwave/hg_comm.c diff -u php4/ext/hyperwave/hg_comm.c:1.12 php4/ext/hyperwave/hg_comm.c:1.13 --- php4/ext/hyperwave/hg_comm.c:1.12 Wed Oct 6 01:31:23 1999 +++ php4/ext/hyperwave/hg_comm.c Tue Oct 19 09:54:44 1999 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hg_comm.c,v 1.12 1999/10/06 05:31:23 steinm Exp $ */ +/* $Id: hg_comm.c,v 1.13 1999/10/19 13:54:44 steinm Exp $ */ /* #define HW_DEBUG */ @@ -217,12 +217,13 @@ * Function fnCreateAnchorList() * * * * Returns a list of Anchors converted from an object record * -* Parameter: char **anchors: object records of anchors * +* Parameter: int objectID: the object for which the list is created * +* char **anchors: object records of anchors * * char **dest: object records of destinations * * int ancount: number of anchors * * Return: List of Anchors, NULL if error * ***********************************************************************/ -DLIST *fnCreateAnchorList(char **anchors, char **docofanchorrec, char **reldestrec, int ancount, int anchormode) +DLIST *fnCreateAnchorList(hw_objectID objectID, char **anchors, char **docofanchorrec, char **reldestrec, int ancount, int anchormode) { int start, end, i, destid, anchordestid, objectID; ANCHOR *cur_ptr = NULL; @@ -287,22 +288,29 @@ tempptr = reldestptr; } if(NULL != tempptr) { - /* It's always nice to deal with names, so let's first check - for a name. If there is none we take the ObjectID. - */ - if(NULL != (str = strstr(tempptr, "Name="))) { - str += 5; - } else if(NULL != (str = strstr(tempptr, "ObjectID="))) { - str += 9; - } - if(sscanf(str, "%s\n", destdocname)) { - cur_ptr->destdocname = estrdup(destdocname); - } destid = 0; if(NULL != (str = strstr(tempptr, "ObjectID="))) { str += 9; sscanf(str, "0x%X", &destid); } + /* This is basically for NAME tags. There is no need + to add the destname if it is the document itself. + */ +/* if(destid == objectID) { + cur_ptr->destdocname = NULL; + } else { */ + /* It's always nice to deal with names, so let's first check + for a name. If there is none we take the ObjectID. + */ + if(NULL != (str = strstr(tempptr, "Name="))) { + str += 5; + } else if(NULL != (str = strstr(tempptr, "ObjectID="))) { + str += 9; + } + if(sscanf(str, "%s\n", destdocname)) { + cur_ptr->destdocname = estrdup(destdocname); + } +/* } */ } } @@ -938,7 +946,8 @@ server_addr.sin_port = htons(port); else server_addr.sin_port = htons(HG_SERVER_PORT); - bcopy(hp->h_addr, (char *) &server_addr.sin_addr, hp->h_length); +/* bcopy(hp->h_addr, (char *) &server_addr.sin_addr, hp->h_length); */ + server_addr.sin_addr = *(struct in_addr *) hp->h_addr; if ( (sockfd = socket(AF_INET, SOCK_STREAM, 0)) == SOCK_ERR ) { return(-2); @@ -1882,7 +1891,7 @@ send_getdestforanchorsobj(sockfd, anchors, &destrec, ancount); send_getreldestforanchorsobj(sockfd, anchors, &reldestrec, ancount, rootid, objectID); - pAnchorList = fnCreateAnchorList(anchors, destrec, reldestrec, ancount, mode); + pAnchorList = fnCreateAnchorList(objectID, anchors, destrec, reldestrec, ancount, mode); /* Free only the array, the objrecs has been freed in fnCreateAnchorList() */ if(anchors) efree(anchors); if(destrec) efree(destrec); @@ -4220,7 +4229,7 @@ send_getdestforanchorsobj(sockfd, anchors, &destrec, ancount); send_getreldestforanchorsobj(sockfd, anchors, &reldestrec, ancount, rootid, objectID); - pAnchorList = fnCreateAnchorList(anchors, destrec, reldestrec, ancount, mode); + pAnchorList = fnCreateAnchorList(objectID, anchors, destrec, reldestrec, ancount, mode); /* Free only the array, the objrecs has been freed in fnCreateAnchorList() */ if(anchors) efree(anchors); if(destrec) efree(destrec); Index: php4/ext/hyperwave/hw.c diff -u php4/ext/hyperwave/hw.c:1.22 php4/ext/hyperwave/hw.c:1.23 --- php4/ext/hyperwave/hw.c:1.22 Wed Oct 6 01:31:22 1999 +++ php4/ext/hyperwave/hw.c Tue Oct 19 09:54:44 1999 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hw.c,v 1.22 1999/10/06 05:31:22 steinm Exp $ */ +/* $Id: hw.c,v 1.23 1999/10/19 13:54:44 steinm Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" #endif @@ -372,9 +372,10 @@ attrname = strtok(NULL, "\n"); } if(NULL == sarr){ - spec_arr->refcount--; - zend_hash_destroy(spec_arr->value.ht); - efree(spec_arr->value.ht); +// spec_arr->refcount--; +// zend_hash_destroy(spec_arr->value.ht); +// efree(spec_arr->value.ht); + zval_dtor(spec_arr); efree(spec_arr); } efree(temp);

« previous php.version4 (#5570) next »