lua頭檔案翻譯之lauxlib

2021-03-31 08:57:00 字數 4097 閱讀 6317

unit lauxlib;

inte***ce

uses lua;

type

lual_reg = record

name: pchar;

func: lua_cfunction;

end;

procedure lual_openlib(l: lua_state; libname: pchar; lr: lual_reg;

nup: int); stdcall; external luadll;

function lual_getmetafield(l: lua_state; obj: int;

e: pchar): int; stdcall; external luadll;

function lual_callmeta(l: lua_state; obj: int;

e: pchar): int; stdcall; external luadll;

function lual_typerror(l: lua_state; narg: int;

tname: pchar): int; stdcall; external luadll;

function lual_argerror(l: lua_state; numarg: int;

extramsg: pchar): int; stdcall; external luadll;

function lual_checklstring(l: lua_state; numarg: int;

st: size_t): pchar; stdcall; external luadll;

function lual_optlstring(l: lua_state; numarg: int; def: pchar;

sz: size_t): pchar; stdcall; external luadll;

function lual_checknumber(l: lua_state;

numarg: int): lua_number; stdcall; external luadll;

function lual_optnumber(l: lua_state; narg: int;

def: lua_number): lua_number; stdcall; external luadll;

procedure lual_checkstack(l: lua_state; sz: int;

msg: pchar); stdcall; external luadll;

procedure lual_checktype(l: lua_state; narg: int;

t: int); stdcall; external luadll;

procedure lual_checkany(l: lua_state; narg: int); stdcall; external luadll;

function lual_newmetatable(l: lua_state;

tname: pchar): int; stdcall; external luadll;

procedure lual_getmetatable(l: lua_state;

tname: pchar); stdcall; external luadll;

procedure lual_checkudata(l: lua_state; ud: int;

tname: pchar); stdcall; external luadll;

procedure lual_where(l: lua_state; lvl: int); stdcall; external luadll;

function lual_error(l: lua_state; fmt: pchar): int; stdcall; external luadll;

function lual_findstring(st: pchar; lst: pchar): int; stdcall; external luadll;

function lual_ref(l: lua_state; t: int): int; stdcall; external luadll;

procedure lual_unref(l: lua_state; t: int; ref: int); stdcall; external luadll;

function lual_getn(l: lua_state; t: int): int; stdcall; external luadll;

procedure lual_setn(l: lua_state; t: int; n: int); stdcall; external luadll;

function lual_loadfile(l: lua_state;

filename: pchar): int; stdcall; external luadll;

function lual_loadbuffer(l: lua_state; buff: pchar; sz: size_t;

name: pchar): int; stdcall; external luadll;

const

bufsiz = 60;

lual_buffersize = bufsiz;

type

lual_buffer = record

p: pchar;

lvl: int;

l: lua_state;

buffer: array[0..lual_buffersize] of pchar;

end;

varlualbuffer: lual_buffer;

procedure lual_buffinit(l: lua_state; b: lual_buffer); stdcall; external luadll;

function lual_prepbuffer(b: lual_buffer): pchar; stdcall; external luadll;

procedure lual_addlstring(b: lual_buffer; s: pchar;

l: size_t); stdcall; external luadll;

procedure lual_addstring(b: lual_buffer; s: pchar); stdcall; external luadll;

procedure lual_addvalue(b: lual_buffer); stdcall; external luadll;

procedure lual_pushresult(b: lual_buffer); stdcall; external luadll;

function lua_dofile(l: lua_state;

filename: pchar): int; stdcall; external luadll;

function lua_dostring(l: lua_state; str: pchar): int; stdcall; external luadll;

function lua_dobuffer(l: lua_state; buff: pchar; sz: size_t;

n: pchar): int; stdcall; external luadll;

{const

lual_check_lstr=lual_checklstring;

lual_opt_lstr=lual_optlstring;

lual_check_number=lual_checknumber;

lual_opt_number=lual_optnumber;

lual_arg_check=lual_argcheck;

lual_check_string=lual_checkstring;

lual_opt_string=lual_optstring;

lual_check_int=lual_checkint;

lual_check_long=lual_checklong;

lual_opt_int=lual_optint;

lual_opt_long=lual_optlong;

implementation

end.

PDF檔案翻譯教程

pdf檔案目前在辦公中是接觸的越來越多的檔案之一了,對於pdf檔案而言,但是大家有時候拿到的pdf檔案中的語音剛好是自己看不懂的,這時,就需要翻譯了,接下來小編告訴大家如何把pdf檔案進行翻譯吧。2 將pdf轉換器用滑鼠點選開啟,在介面上面用滑鼠點選介面下面的特色轉換,點選之後,介面下面會出現一些不...

CAD中DXF檔案翻譯為SCR檔案

include include include include define pi 3.14159265 用ultradiusaedit開啟dxf檔案,查詢line ciradiuscle等命令可以可發現,line到座標點之間有 12行的無用資訊,轉換成scradius時,需要忽略掉 void ig...

assert h標頭檔案之斷言

在現實世界中,我們腦袋時刻都在判斷對與錯,對的事情我們會繼續深入下去,而錯的事情我們會馬上停止,那麼在程式設計開發中我們如何賦予程式這種判斷事物對錯的能力呢?其中乙個方案就可以使用斷言assert,我們最常用的地方就是在函式中檢查形參的資料合法性。1 函式所屬標頭檔案 assert.h 2 函式原型...