[FoLUG]DA C a C++?

kei folug@lists.linux.it
Wed, 9 Oct 2002 17:49:50 +0200


--------------Boundary-00=_2B1QY8CDL6XZDLCMTNFX
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Siccome non sono riuscito a dare una veste grafica a sto' caz... di programma
(pna.c -> filtra una sequenza di 10-18 basi partendo da DNA -prova.seq- 
->[kei@localhost .gnome-desktop]$ ./pna prova.seq ),vi chiedevo se è 
possibile trasformarlo in C++ in poco tempo, magari comprando o scaricando un 
manuale... così poi lo posso infilare nel Visual C++. Ve lo allego con la 
sequenza, così magari vedete la situazione... (alquanto triste). Cià
--------------Boundary-00=_2B1QY8CDL6XZDLCMTNFX
Content-Type: text/x-c;
  charset="iso-8859-1";
  name="pna.c"
Content-Transfer-Encoding: base64
Content-Description: Filtra pna da Dna
Content-Disposition: attachment; filename="pna.c"

LyogUE5BKi8KICAgCiNpbmNsdWRlIDxzdGRpby5oPgoKI2RlZmluZSBtaW5sZW4gMTAKI2RlZmlu
ZSBNQVhMRU4gMTggCiNkZWZpbmUgRklORVNUUkEgMTAKI2RlZmluZSBNQVhQTkEgMjAwMAojZGVm
aW5lIE1BWFBVUklORSA1CiNkZWZpbmUgVE0gNjAKI2RlZmluZSBUUFVSIDUKI2RlZmluZSBUUElS
IDMKI2RlZmluZSBMVU5HSEVaWkEgMTAgCiNkZWZpbmUgTUFYR1VBTklOQSA0CmNoYXIgY29udmVy
cyhjaGFyKTsKaW50IHB1cmluYV9wZXp6byhjaGFyKiwgY2hhciosIGludCopOwoKaW50IG1haW4o
aW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkgewoJRklMRSAqZnA7CglpbnQgaSxrLGosZ2MseixnLHBy
ZWMsIGxlbiwgdmFkbyxzZXEsIGluaXppbywgdG07CglpbnQgcGF1c2EsIGNhcG87CgljaGFyIHBu
YVtNQVhQTkFdLGM7CgljaGFyIHBlenpvW01BWExFTl0scGV6W01BWExFTl07CiAgICAgICAgaWYo
I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GltX3N1cC1saW1faW5mOwogICAgICAgIGZvcihpPWxpbV9pbmY7aTw9bGltX3N1cDtp
KyspIHsKCQkvKnByaW50ZigiJWMiLHBlenpvW2ldKTsgKi8KCQlhcHBbaS1saW1faW5mXT1wZXp6
b1tpXTsKICAgICAgICB9CgkvKnByaW50ZigiXG4iKTsqLwoJKmluaXppbz1saW1faW5mOwoJcmV0
dXJuKGxlbisxKTsKfQogICAKCgkKCgkK

--------------Boundary-00=_2B1QY8CDL6XZDLCMTNFX
Content-Type: text/plain;
  charset="iso-8859-1";
  name="prova.seq"
Content-Transfer-Encoding: base64
Content-Description: sequenza di Dna
Content-Disposition: attachment; filename="prova.seq"

YXR0dGd0dHR0Z2NjY3R0YWdhZ2FnYXR0dHRhZ2FnYWNjY2NjdHR0Y2NjYWdhZ2FndHRjCg==

--------------Boundary-00=_2B1QY8CDL6XZDLCMTNFX--