# luac.c File Reference

`#include <errno.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include "lua.h"`
`#include "lauxlib.h"`
`#include "ldo.h"`
`#include "lfunc.h"`
`#include "lmem.h"`
`#include "lobject.h"`
`#include "lopcodes.h"`
`#include "lstring.h"`
`#include "lundump.h"`

## Classes
struct | Smain
## Defines
#define | luac_c
#define | LUA_CORE
#define | PROGNAME "luac"
#define | OUTPUT PROGNAME ".out"
#define | IS(s) (strcmp(argv[i],s)==0)
#define | toproto(L, i) (clvalue(L->top+(i))->l.p)
## Functions
static void | fatal (const char *message)
static void | cannot (const char *what)
static void | usage (const char *message)
static int | doargs (int argc, char *argv[])
static const Proto * | combine (lua_State *L, int n)
static int | writer (lua_State *L, const void *p, size_t size, void *u)
static int | pmain (lua_State *L)
int | main (int argc, char *argv[])
## Variables
static int | listing = 0
static int | dumping = 1
static int | stripping = 0
static char | Output [] = { OUTPUT }
static const char * | output = Output
static const char * | progname = PROGNAME

## Define Documentation

#define IS | ( | s |  | ) | (strcmp(argv[i],s)==0)

#define LUA_CORE

#define luac_c

#define OUTPUT PROGNAME ".out"

#define PROGNAME "luac"

#define toproto | ( | L,
|  | i |  | ) | (clvalue(L->top+(i))->l.p)

## Function Documentation

static void cannot | ( | const char * | what | ) | `[static]`

static const Proto* combine | ( | lua_State * | L,
|  | int | n |
| ) |  |  | `[static]`

static int doargs | ( | int | argc,
|  | char * | argv[] |
| ) |  |  | `[static]`

static void fatal | ( | const char * | message | ) | `[static]`

int main | ( | int | argc,
|  | char * | argv[] |
| ) |  |  |

static int pmain | ( | lua_State * | L | ) | `[static]`

static void usage | ( | const char * | message | ) | `[static]`

static int writer | ( | lua_State * | L,
|  | const void * | p,
|  | size_t | size,
|  | void * | u |
| ) |  |  | `[static]`

## Variable Documentation

int dumping = 1`[static]`

int listing = 0`[static]`

const char* output = Output`[static]`

char Output[] = { OUTPUT }`[static]`

const char* progname = PROGNAME`[static]`

int stripping = 0`[static]`