On Sun, 10 Nov 2002, Bill Healy wrote:

>
> Davide,
>
> I think you posted a table of retry values in the paste, can't that be
> put into the docs and the link fixed to go to it?

Can someone convert this *very complex* C source to Perl :

------------------------------------------------------------

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char * argv[]) {

        unsigned t, i, n, tot, c;

        if (argc < 4) {
                printf("use: %s  init_delay  delay_incr  num_retries\n", argv[0]);
                return 1;
        }

        t = atoi(argv[1]);
        i = atoi(argv[2]);
        n = atoi(argv[3]);
        tot = 0;

        for (c = 1; c <= n; c++) {
                printf("%02u\tsend-time = %-6u\tnext-try = %u\n", c, tot, t);

                tot += t;
                t += t / i;
        }
        return 0;
}

------------------------------------------------------------



- Davide


-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to