/* charset.c */
/************************************************************************/
static char outputbuffer[LINE_BUF_SIZE]="";
+
+int para_double_newline = 1;
+
void out_char(const char *chunk) {
static int bufpos=0;
int eol_flag=0;
*p;
*(q++)=*(p++),bufpos++) {
if (*p=='\n') eol_flag=1;
- }
+ }
*q=0;
/* This strcat is safe. wrap margin setting
code in main.c ensures that wrap_margin is
fputs(outputbuffer,stdout);
*outputbuffer=0;
bufpos=0;
- if (q) {
- fputs(q,stdout);
- } else {
- fputc('\n',stdout);
- }
+ if (para_double_newline) {
+ if (q) {
+ fputs(q,stdout);
+ } else {
+ fputc('\n',stdout);
+ }
+ }
} else if (bufpos>wrap_margin) {
char *q=outputbuffer,*p=outputbuffer+wrap_margin;
if (p==outputbuffer) {
/*worst case - nowhere to wrap. Will use brute force */
int i = wrap_margin;
- if (from_unicode == to_utf8) {
+ if (target_charset == NULL) {
+ /* NULL target_charest means UTF-8 */
/* go back to start of nearest utf-8 character */
while(i>0 && (outputbuffer[i] & 0xC0) == 0x80) i--;
}