Patten lists ajax header, third draft
Henrikki Almusa
henrikki.almusa at helsinki.fi
Thu Jul 1 14:08:06 UTC 2004
Hello
Heres the third version of the files 'ajpat.c' and 'ajpat.h'. Atm i have
tested the regular expression handling and it seems to work now. I can add
pattern to list, test it against a string and then clear the list. There is
one compiler warning though (my fixing causes deleting to segfault).
ajpat.c: In function `ajPatternDel':
ajpat.c:53: warning: passing arg 1 of `ajRegFree' from incompatible pointer
type
The for testing was in dreg and was this:
AjPPatlist plist;
AjPPattern pat;
AjPStr file;
AjPStr tested;
file=ajStrNewC("pattern.file");
tested=ajStrNewC("ggagagagagttct");
plist=ajPatlistNew();
ajPatlistParsePatternFile(plist,file,1);
while (ajPatlistGetNext(plist,&pat))
{
ajFmtPrint ("name: %S mismatch:
%d\n",ajPatternGetName(pat),ajPatternGetMismatch(pat));
patexp = ajPatternGetCompiledPattern(pat);
if (ajRegExec(patexp,tested))
ajFmtPrint (" found from '%d'\n",ajRegOffset(patexp));
}
ajDebug ("Starting deleting\n");
ajPatlistDel(&plist);
Now the main issues with this is still the prosite pattern handling. From my
understanding it could be fixed by making prosite patterns use a struct to
move the needed pieces around. That would be easy then to be used with this
as well.
Other point is the overloading of the acd functions. I don't yet know how to
do that. However I would like some comments on whether this is a good way to
do this (and could be accepted to emboss, when ready).
Thanks,
--
Henrikki Almusa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ajpat.c
Type: text/x-csrc
Size: 6542 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/emboss-dev/attachments/20040701/7d0f80f2/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ajpat.h
Type: text/x-chdr
Size: 1964 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/emboss-dev/attachments/20040701/7d0f80f2/attachment-0003.bin>
More information about the emboss-dev
mailing list