File: jpeg_common.c

package info (click to toggle)
golang-github-antonini-golibjpegturbo 0.0~git20141208.c03a2fa-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 344 kB
  • sloc: ansic: 14; makefile: 5
file content (17 lines) | stat: -rw-r--r-- 367 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "_cgo_export.h"

void error_panic(j_common_ptr cinfo) {
  struct { const char *p; } a;
  char buffer[JMSG_LENGTH_MAX];
  (*cinfo->err->format_message) (cinfo, buffer);
  goPanic(buffer);
}

typedef struct {
  unsigned char *buf;
  unsigned long buf_size;
} mem_helper;

mem_helper *alloc_mem_helper() {
  return (mem_helper*) calloc(1,sizeof(mem_helper));
}