瀏覽代碼

* Added preliminary (but working) SVG exporter

tags/v0.99.beta14
Jean-Yves Lamoureux jylam 18 年之前
父節點
當前提交
d1f6bb6759
共有 5 個檔案被更改,包括 7 行新增1 行删除
  1. +1
    -0
      cucul/Makefile.am
  2. +3
    -0
      cucul/cucul.c
  3. +1
    -0
      cucul/cucul.h
  4. +1
    -1
      cucul/export_html.c
  5. +1
    -0
      cucul/export_ps.c

+ 1
- 0
cucul/Makefile.am 查看文件

@@ -20,6 +20,7 @@ libcucul_la_SOURCES = \
export_ansi.c \
export_html.c \
export_ps.c \
export_svg.c \
$(NULL)
libcucul_la_LDFLAGS = -no-undefined
libcucul_la_LIBADD = @CUCUL_LIBS@


+ 3
- 0
cucul/cucul.c 查看文件

@@ -298,6 +298,9 @@ struct cucul_buffer * cucul_export(cucul_t *qq, enum cucul_format format)
case CUCUL_FORMAT_PS:
_cucul_get_ps(qq, ex);
break;
case CUCUL_FORMAT_SVG:
_cucul_get_svg(qq, ex);
break;
default:
free(ex);
return NULL;


+ 1
- 0
cucul/cucul.h 查看文件

@@ -61,6 +61,7 @@ enum cucul_format
CUCUL_FORMAT_HTML3 = 2, /**< Export to old HTMLv3 format. */
CUCUL_FORMAT_IRC = 3, /**< Export to text with mIRC colours. */
CUCUL_FORMAT_PS = 4, /**< Export to PostScript. */
CUCUL_FORMAT_SVG = 5, /**< Export to Scalable Vector Graphics format. */
};

/** \brief Internal features.


+ 1
- 1
cucul/export_html.c 查看文件

@@ -88,7 +88,7 @@ void _cucul_get_html(cucul_t *qq, struct cucul_buffer *ex)
if(linechar[x + len] == (uint32_t)' ')
cur += sprintf(cur, "&nbsp;");
else
cur += sprintf(cur, "%c", linechar[x + len] & 0x7f);
cur += sprintf(cur, "%c", linechar[x] & 0x7f);
}
cur += sprintf(cur, "</span>");
}


+ 1
- 0
cucul/export_ps.c 查看文件

@@ -139,5 +139,6 @@ void _cucul_get_ps(cucul_t *qq, struct cucul_buffer *ex)
/* Crop to really used size */
ex->size = strlen(ex->buffer) + 1;
ex->buffer = realloc(ex->buffer, ex->size);

}


Loading…
取消
儲存