#include "./pnmdec.h"
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "webp/encode.h"
#include "./imageio_util.h"
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf …
#endif
PNMFlags;
PNMInfo;
#define MAX_LINE_SIZE …
static const size_t kMinPNMHeaderSize = …;
static size_t ReadLine(const uint8_t* const data, size_t off, size_t data_size,
char out[MAX_LINE_SIZE + 1], size_t* const out_size) { … }
static size_t FlagError(const char flag[]) { … }
static size_t ReadPAMFields(PNMInfo* const info, size_t off) { … }
static size_t ReadHeader(PNMInfo* const info) { … }
int ReadPNM(const uint8_t* const data, size_t data_size,
WebPPicture* const pic, int keep_alpha,
struct Metadata* const metadata) { … }