… | |
… | |
383 | int toklen, i; |
383 | int toklen, i; |
384 | time_t tstamp = timestamp ? timestamp : time (0); |
384 | time_t tstamp = timestamp ? timestamp : time (0); |
385 | struct tm *tm = gmtime (&tstamp); |
385 | struct tm *tm = gmtime (&tstamp); |
386 | |
386 | |
387 | New (0, token, |
387 | New (0, token, |
388 | 1 + 1 // version |
388 | 1 + 1 // version |
389 | + 12 + 1 // time field sans century |
389 | + 12 + 1 // time field sans century |
390 | + strlen (resource) + 1 // ressource |
390 | + strlen (resource) + 1 // ressource |
391 | + strlen (trial) + extrarand + 8 + 1 // trial |
391 | + strlen (trial) + extrarand + 8 + 1 // trial |
392 | + 1, |
392 | + 1, |
393 | char); |
393 | char); |
394 | |
394 | |
395 | if (!token) |
395 | if (!token) |
396 | croak ("out of memory"); |
396 | croak ("out of memory"); |
397 | |
397 | |
398 | if (size > 64) |
398 | if (size > 64) |