]> granicus.if.org Git - php/commitdiff
- Inserting links without any delimiters is now possible
authorUwe Steinmann <steinm@php.net>
Fri, 16 Mar 2001 17:40:38 +0000 (17:40 +0000)
committerUwe Steinmann <steinm@php.net>
Fri, 16 Mar 2001 17:40:38 +0000 (17:40 +0000)
ext/hyperwave/hg_comm.c
ext/hyperwave/hg_comm.h

index 9fd22beaaa44338ca804cae8262d5e3eccb9cf41..efff670ef5da66e90037231ae79552bc35664240 100644 (file)
@@ -523,6 +523,19 @@ DLIST *fnCreateAnchorList(hw_objectID objID, char **anchors, char **docofanchorr
                                                if(strncmp(str, "background", 10) == 0)
                                                        cur_ptr->linktype=HW_BACKGROUND_LINK;
                                                else
+                                               if(strncmp(str, "intagnodel", 10) == 0) { /* New type introduced by Uwe Steinmann 16.03.2001 */
+                                                       cur_ptr->linktype=HW_INTAGNODEL_LINK;
+                                                       cur_ptr->tagattr = NULL;
+                                                       if(NULL != (str = strstr(object, "TagAttr="))) {
+                                                               str += 8;
+                                                               str1 = str;
+                                                               while((*str1 != '\n') && (*str1 != '\0'))
+                                                                       str1++;
+                                                               cur_ptr->tagattr = emalloc(str1 - str + 1);
+                                                               memcpy(cur_ptr->tagattr, str, str1 - str);
+                                                               cur_ptr->tagattr[str1 - str] = '\0';
+                                                       }
+                                               } else
                                                if(strncmp(str, "intag", 5) == 0) {
                                                        cur_ptr->linktype=HW_INTAG_LINK;
                                                        cur_ptr->tagattr = NULL;
@@ -693,6 +706,11 @@ char *fnInsAnchorsIntoText(char *text, DLIST *pAnchorList, char **bodytag, char
                                        case HW_INTAG_LINK:
                                                snprintf(istr, BUFFERLEN, " %s='%s'", cur_ptr->tagattr, cur_ptr->link);
                                                offset -= 4; /* because there is no closing tag </A> */
+/*                                             laststart = cur_ptr->start; */
+                                               break;
+                                       case HW_INTAGNODEL_LINK:
+                                               snprintf(istr, BUFFERLEN, "%s", cur_ptr->link);
+                                               offset -= 4; /* because there is no closing tag </A> */
 /*                                             laststart = cur_ptr->start; */
                                                break;
                                        case HW_APPLET_LINK:
@@ -727,7 +745,10 @@ char *fnInsAnchorsIntoText(char *text, DLIST *pAnchorList, char **bodytag, char
                                                else
                                                        snprintf(istr, BUFFERLEN, " %s='%s/%s'", cur_ptr->tagattr, scriptname[HW_INTAG_LINK], cur_ptr->destdocname); 
                                                offset -= 4; /* because there is no closing tag </A> */
-/*                                             laststart = cur_ptr->start; */
+                                               break;
+                                       case HW_INTAGNODEL_LINK:
+                                               snprintf(istr, BUFFERLEN, "%s", cur_ptr->destdocname);
+                                               offset -= 4; /* because there is no closing tag </A> */
                                                break;
                                        case HW_APPLET_LINK:
                                                if(cur_ptr->codebase)
index 56b3a419ef03233d279bbd762f5157f77ddc6256..a1aee74f858d3167db50360ae09b73cfe0cd6e42 100644 (file)
@@ -85,6 +85,7 @@
 #define HW_BACKGROUND_LINK            2
 #define HW_INTAG_LINK                 3
 #define HW_APPLET_LINK                4
+#define HW_INTAGNODEL_LINK            5
 
 #define COPY                          0
 #define MOVE                          1