~ubuntu-branches/ubuntu/trusty/htp/trusty

« back to all changes in this revision

Viewing changes to src/use-proc.c

  • Committer: Bazaar Package Importer
  • Author(s): Diego Escalante Urrelo
  • Date: 2007-10-21 21:59:40 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20071021215940-90qtozny64s4f1rg
Tags: 1.16-2
* Makefile.config: Hardcode /usr as the PREFIX, it was using /usr/local
  otherwise by unknown reasons.
* src/snprintf.c:
* src/snprintf.h: Remove the asnprintf and asprintf functions since they were
keeping s390 from building and are actually not used, closes: #443616.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    VARSTORE varstore;
29
29
    VARSTORE *topVarstore;
30
30
 
31
 
    /* check if name is present */
32
 
    nameAttrib = UnlinkAttributeInMarkup(htmlMarkup, "NAME");
33
 
    if (nameAttrib != NULL && nameAttrib->value != NULL) {
34
 
 
35
 
        /* new syntax */
36
 
        name = nameAttrib->value;
37
 
 
 
31
    nameAttrib = htmlMarkup->attrib;
 
32
    if(nameAttrib == NULL)
 
33
    {
 
34
        HtpMsg(MSG_ERROR, task->infile, "USE markup without parameter");
 
35
        return MARKUP_ERROR;
 
36
    }
 
37
    if (nameAttrib->value) {
 
38
        if (stricmp(nameAttrib->name, "NAME") == 0) {
 
39
            HtpMsg(MSG_WARNING, task->infile,
 
40
                   "deprecated USE syntax, see manual");
 
41
            name = nameAttrib->value;
 
42
        } else {
 
43
            HtpMsg(MSG_ERROR, task->infile, "illegal USE markup");
 
44
            return MARKUP_ERROR;
 
45
        }
38
46
    } else {
39
 
        /* The only attribute is the macro name without value 
40
 
         * (which can be "name" though).
41
 
         */
42
 
        if (nameAttrib == NULL) {
43
 
            nameAttrib = htmlMarkup->attrib;
44
 
            if(nameAttrib == NULL)
45
 
            {
46
 
                HtpMsg(MSG_ERROR, task->infile, 
47
 
                       "USE markup without parameter", htmlMarkup->tag);
48
 
                return MARKUP_ERROR;
49
 
            }
50
 
            htmlMarkup->attrib = nameAttrib->next;
51
 
        }
52
47
        name = nameAttrib->name;
53
48
    }
54
 
 
 
49
    htmlMarkup->attrib = nameAttrib->next;
55
50
 
56
51
    /* check if the noexpand flag is present */
57
52
    noexpand = UnlinkBoolAttributeInMarkup(htmlMarkup, "NOEXPAND");