static void do_time(FILE *file) { time_t current_time; struct tm *bd_time; current_time = dpx_util_get_unique_time_if_given(); if (current_time == INVALID_EPOCH_VALUE) { time(¤t_time); bd_time = localtime(¤t_time); } else { bd_time = gmtime(¤t_time); } fprintf(file, "%%%%CreationDate: %s\n", asctime(bd_time)); }
void pdf_font_make_uniqueTag (char *tag) { int i; char ch; static char first = 1; if (first) { time_t current_time; current_time = dpx_util_get_unique_time_if_given(); if (current_time == INVALID_EPOCH_VALUE) current_time = time(NULL); srand(current_time); first = 0; } for (i = 0; i < 6; i++) { ch = rand() % 26; tag[i] = ch + 'A'; } tag[6] = '\0'; }