[med-svn] r7913 - trunk/packages/rostlab/libzerg/trunk/debian/patches
Laszlo Kajan
lkajan-guest at alioth.debian.org
Fri Sep 23 19:32:23 UTC 2011
Author: lkajan-guest
Date: 2011-09-23 19:32:22 +0000 (Fri, 23 Sep 2011)
New Revision: 7913
Modified:
trunk/packages/rostlab/libzerg/trunk/debian/patches/blastpgp
Log:
added zerg_read_stream(FILE*) method to read from streams; zerg_open_file() and zerg_read_stream() now reset the lexer start condition to INITIAL
Modified: trunk/packages/rostlab/libzerg/trunk/debian/patches/blastpgp
===================================================================
--- trunk/packages/rostlab/libzerg/trunk/debian/patches/blastpgp 2011-09-23 14:32:53 UTC (rev 7912)
+++ trunk/packages/rostlab/libzerg/trunk/debian/patches/blastpgp 2011-09-23 19:32:22 UTC (rev 7913)
@@ -1,7 +1,7 @@
Index: libzerg-1.0.7/zerglexer.lex
===================================================================
--- libzerg-1.0.7.orig/zerglexer.lex 2009-01-27 21:47:40.000000000 +0100
-+++ libzerg-1.0.7/zerglexer.lex 2011-09-22 19:14:02.017700383 +0200
++++ libzerg-1.0.7/zerglexer.lex 2011-09-23 21:17:52.889962009 +0200
@@ -35,10 +35,11 @@
static char _zerg_internal_buffer[INTERNAL_BUFFER_LENGTH];
static char* _zerg_description_score;
@@ -196,7 +196,7 @@
<s_identities>[0-9]+ RET(s_identities_2,yytext,IDENTITIES);
<s_identities_2>"/" BEGIN(s_alignment_length);
<s_alignment_length>[0-9]+ RET(s_alignment_length_2,yytext,ALIGNMENT_LENGTH);
-@@ -398,101 +396,89 @@
+@@ -398,108 +396,108 @@
<s_gaps_3,s_subject_orientation_2,s_frame_5>\n+ BEGIN(s_hsp);
<s_hsp>(" "*\n)?"Query:"" "+ BEGIN(s_query_start);
@@ -210,7 +210,7 @@
- RET(s_query_start_2,yytext,QUERY_START);
- }
- }
-
+-
-<s_query_start_2>" "+[^ \t]+" "+ BEGIN(s_query_end);
-<s_query_end>[0-9]+ {
- if(!_zerg_ignore[QUERY_END])
@@ -237,7 +237,7 @@
- RET(s_subject_start_2,yytext,SUBJECT_START);
- }
- }
--
+
-<s_subject_start_2>" "*[^ \t]+" "+ BEGIN(s_subject_end);
-<s_subject_end>[0-9]+ {
- if(!_zerg_ignore[SUBJECT_END])
@@ -365,7 +365,27 @@
%%
-@@ -516,7 +502,7 @@
+
+ void zerg_open_file(char* filename)
+ {
+- zergin=fopen(filename,"r");
++ FILE * fh;
++
++ fh = fopen(filename,"r");
++
++ if( !fh ) zergrestart( stdin );
++ else zergrestart( fh );
++ BEGIN(INITIAL);
++}
++
++void zerg_read_stream(FILE* __stream)
++{
++ zergrestart( __stream );
++ BEGIN(INITIAL);
+ }
+
+ void zerg_close_file()
+@@ -516,7 +514,7 @@
void zerg_ignore_all()
{
int i;
@@ -374,7 +394,7 @@
_zerg_ignore[i]=1;
}
-@@ -528,7 +514,7 @@
+@@ -528,7 +526,7 @@
void zerg_unignore_all()
{
int i;
@@ -383,7 +403,7 @@
_zerg_ignore[i]=0;
}
-@@ -548,3 +534,5 @@
+@@ -548,3 +546,5 @@
else
return pos - YY_CURRENT_BUFFER->yy_n_chars + yytext -YY_CURRENT_BUFFER->yy_ch_buf - _zerg_desconto;
}
@@ -392,7 +412,7 @@
Index: libzerg-1.0.7/zerg.h
===================================================================
--- libzerg-1.0.7.orig/zerg.h 2005-01-10 23:55:46.000000000 +0100
-+++ libzerg-1.0.7/zerg.h 2011-09-22 19:14:33.101700455 +0200
++++ libzerg-1.0.7/zerg.h 2011-09-23 20:33:04.697700347 +0200
@@ -6,37 +6,51 @@
#ifndef _zerg_h_
#define _zerg_h_
@@ -476,6 +496,14 @@
#ifdef __cplusplus
extern "C" {
+@@ -44,6 +58,7 @@
+
+ void zerg_open_file(char* filename);
+ void zerg_close_file();
++void zerg_read_stream(FILE* __stream);
+ void zerg_ignore(int code);
+ void zerg_ignore_all();
+ void zerg_unignore(int code);
Index: libzerg-1.0.7/Makefile.am
===================================================================
--- libzerg-1.0.7.orig/Makefile.am 2011-09-21 09:51:53.000000000 +0200
More information about the debian-med-commit
mailing list