From 892423a588aea8fb14e84bdb9527df97e945ec57 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Thu, 6 Aug 2009 13:04:20 +0200 Subject: Rename typedefs (breaks API) Rename all typedefs from the convention foo_bar_t, which can possibly conflict with POSIX types, to FooBar (and ASS_FooBar for public API typedefs). Fix formatting and stray comments while at it. --- test/test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/test.c b/test/test.c index 86fa342..fbe4caa 100644 --- a/test/test.c +++ b/test/test.c @@ -9,8 +9,8 @@ typedef struct image_s { unsigned char *buffer; // RGB24 } image_t; -ass_library_t *ass_library; -ass_renderer_t *ass_renderer; +ASS_Library *ass_library; +ASS_Renderer *ass_renderer; void msg_callback(int level, const char *fmt, va_list va, void *data) { @@ -21,7 +21,7 @@ void msg_callback(int level, const char *fmt, va_list va, void *data) printf("\n"); } -static void write_png(char *fname, image_t * img) +static void write_png(char *fname, image_t *img) { FILE *fp; png_structp png_ptr; @@ -114,7 +114,7 @@ static image_t *gen_image(int width, int height) #define _b(c) (((c)>>8)&0xFF) #define _a(c) ((c)&0xFF) -static void blend_single(image_t * frame, ass_image_t * img) +static void blend_single(image_t * frame, ASS_Image *img) { int x, y; unsigned char opacity = 255 - _a(img->color); @@ -140,7 +140,7 @@ static void blend_single(image_t * frame, ass_image_t * img) } } -static void blend(image_t * frame, ass_image_t * img) +static void blend(image_t * frame, ASS_Image *img) { int cnt = 0; while (img) { @@ -165,13 +165,13 @@ int main(int argc, char *argv[]) double tm = strtod(argv[3], 0); init(frame_w, frame_h); - ass_track_t *track = ass_read_file(ass_library, subfile, NULL); + ASS_Track *track = ass_read_file(ass_library, subfile, NULL); if (!track) { printf("track init failed!\n"); return 1; } - ass_image_t *img = + ASS_Image *img = ass_render_frame(ass_renderer, track, (int) (tm * 1000), NULL); image_t *frame = gen_image(frame_w, frame_h); blend(frame, img); -- cgit v1.2.3