Re: Help! problem running a script.



On Jul 29, 6:07 pm, cche <cris.chapa...@xxxxxxxxx> wrote:
Hi Alex,
On Jul 28, 4:56 pm, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:> On Jul 28, 1:53 pm, cche <cris.chapa...@xxxxxxxxx> wrote:

I'm using tcl8.5, sqlite, xotcl and a c library of mine.
[and my heap is broken]

Then good luck. Had you written your C part in a separate process, the
problem would look very different... Is it an option ? (Justify if
no ;-)

I was expecting your "outsource the code!" but...
This lib I wrote about 8 years ago and about 2 years ago I converted
them to the Tcl_Obj side of the force. It has been working without a
problem since then on 32bit machines. This year I inherited a 64bit
machine plus our servers are 64 bit machines too. Until now I didn't
encounter any problem with this lib. So in the end it is not an option
because I have quite a lot of code depending on this lib.

Anyway I tried to simplify my problem so I implemented most of the c
part in tcl and replaced the call to the lib with this critcl code and
I keep having the same problem... Any thoughts?
Thanks,
Cristian.

critcl::ccode {
   static size_t mstrlen(char* s) {
       size_t n = 0;
       while(*s) {s++; n++;}
       return n;
   }
   const char compl[] = " !\"#$%&'()*+,-./0123456789:;<=>?
@TVGHNNCDNNMNKNNYRYSAABWNRN[\\]^_`tvghnncdnnmnknnyrysaabwnrn{|}~";}

# "
critcl::cproc crevcomp {char* seq} char* {
    long j, k;
    char  ctemp;
    for (j=0, k=mstrlen(seq)-1; j <= k; j++, k--) {
        ctemp = compl[seq[j] - ' '];
        seq[j] = compl[seq[k] - ' '];
        seq[k] = ctemp;
    }
    return seq;


Not sure exactly what that funny cipher does, but it seems within
reach of pure Tcl with a combination of [string map] and [string
reverse]. Am I missing something ?

-Alex
.



Relevant Pages

  • Re: Non-partisan politics...
    ... maker of the machines, Premier Election Solutions, Attorney General ... contract with Premier, formerly known as Diebold, since 2001. ...
    (rec.boats)
  • Re: Dr. James Marsters, TTY deaf service developer [telecom]
    ...    TWX or TELEX machine could communicate with them, ... still had to have a teleprinter and modem no matter what carried the ... machines ran at 110 Baud, but that speed was determined by the Model ... IBM or compatible SNA networks, and they weren't available to the ...
    (comp.dcom.telecom)
  • Re: The wirehead problem
    ... But we weren't debating how I ...  > thought it would work out, we were debating Tim's view that machines will ...    landscape. ... immortality will arrive first - in the squishy human form. ...
    (comp.ai.philosophy)
  • Re: best way to inherit funcs from another object
    ... document.write(script tag to include v4 lib js file) ...     func1: function, ... properties to multiple objects (which is effectively what prototype ... you haven't implemented prototype inheritance properly - it works ...
    (comp.lang.javascript)
  • Re: N. CA. RGP: If anyone here is gonna buy a NO FEAR...
    ...      I just have to reply to the rant in that craigslist posting. ... a regular at Thursday Night Pinball and I don't want people to ... like it perhaps a year ago (there haven't been any slot machines there ... personalities of the people who are regulars in addition to the people ...
    (rec.games.pinball)