int PString(char *str) { unsigned long s; unsigned char *p = (unsigned char *) str; int i; int t = 0; if ((s = strlen(p)) <= 0) return 1; processed += s; while (*p == '\n') { NextLine(); ++p; } fprintf(out, "("); while (*p) { ++str_length; /* if (line_cut == 0) if (str_length > 550.*5./(3.*fontsize)) { fprintf(out, ") s\n"); line--; line_split = 1; NextLine(); if(number_lines) { fprintf(out, "%.2f 0 rmoveto\n", 6.*chw); str_length = 6; } fprintf(out,"("); } */ if (*p == '\n') { fprintf(out, ") s\n"); do NextLine(); while(*++p == '\n'); if (!*p) return 0; fprintf(out, "("); continue; } /* if (*p == '\f') { fprintf(out, ") s\n"); NextPage(); fprintf(out, "("); p++; continue; } */ if (*p == '\t') { t = tab - (str_length - 1 - number_lines * 6) % tab; for (i = 0; i < t; i++) fprintf(out, " "); str_length += t - 1; p++; continue; } /* if (*p < 32 || *p > 127) { fprintf(out, "\\%03o", *p++); continue; } */ if (*p == '(' || *p == ')' || *p == '\\') fprintf(out, "\\"); fprintf(out, "%c", *p); p++; } fprintf(out, ") s\n"); return 0; }