Salve,

forse chiedo troppo, se così fosse vi chiedo scusa.

Ho la seguente routine in C che devo convertire in VB6. L'ho fatto ma il risultato non è corretto.

Qualcuno può convertirla per me?
Ho tolto tutti i commenti per essere breve. Se c'è bisogno di chiarimenti, lo faccio volentieri... ovviamente!

Grazie infinite,
Nino

================================================== ====================
char *
scanback(char *s, char *t)
{
int braces = 1;
if (!s || !t || t < s) return NULL;
while (braces && s < t) {
if (*t=='{' &&
!(*(t-1) == '\\') &&
!(s+5 <= t && !strncmp(t-5,"\\left",5)) &&
!(s+6 <= t && !strncmp(t-6,"\\right",6))
) braces--;

if (*t=='}' &&
!(*(t-1) == '\\') &&
!(s+5 <= t && !strncmp(t-5,"\\left",5)) &&
!(s+6 <= t && !strncmp(t-6,"\\right",6)) ) braces++;

if (braces) t--;
}
return t;
}