~ubuntu-branches/ubuntu/jaunty/luatex/jaunty

« back to all changes in this revision

Viewing changes to src/libs/luasocket/src/auxiliar.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2008-07-07 11:01:13 UTC
  • mfrom: (1.1.5 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080707110113-1y7lam37zbbb7bbt
Tags: 0.28.0-1
* two new upstream releases, see the respective ANNOUCE files
* add luasocket license statement to debian/copyright
* activate the pdfluatex format
* prepare for latex based formats
  - add the ini files from TeX Live
  - add debian/formats file
  - adjust dh_installtex incantation
  the problem is that luatex dies when loading ukrhypmp.tex from 
  texlive-lang-cyrillic, but we don't want to conflict with it by now.
* policy 3.8.0, rename README.Debian-source to README.source, and add
  notes about quilt usage
* disable patch fix-pwd-inclusion (it was from svn)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef AUXILIAR_H
 
2
#define AUXILIAR_H
 
3
/*=========================================================================*\
 
4
* Auxiliar routines for class hierarchy manipulation
 
5
* LuaSocket toolkit (but completely independent of other LuaSocket modules)
 
6
*
 
7
* A LuaSocket class is a name associated with Lua metatables. A LuaSocket 
 
8
* group is a name associated with a class. A class can belong to any number 
 
9
* of groups. This module provides the functionality to:
 
10
*
 
11
*   - create new classes 
 
12
*   - add classes to groups 
 
13
*   - set the class of objects
 
14
*   - check if an object belongs to a given class or group
 
15
*   - get the userdata associated to objects
 
16
*   - print objects in a pretty way
 
17
*
 
18
* LuaSocket class names follow the convention <module>{<class>}. Modules
 
19
* can define any number of classes and groups. The module tcp.c, for
 
20
* example, defines the classes tcp{master}, tcp{client} and tcp{server} and
 
21
* the groups tcp{client,server} and tcp{any}. Module functions can then
 
22
* perform type-checking on their arguments by either class or group.
 
23
*
 
24
* LuaSocket metatables define the __index metamethod as being a table. This
 
25
* table has one field for each method supported by the class, and a field
 
26
* "class" with the class name.
 
27
*
 
28
* The mapping from class name to the corresponding metatable and the
 
29
* reverse mapping are done using lauxlib. 
 
30
*
 
31
* RCS ID: $Id: auxiliar.h,v 1.9 2005/10/07 04:40:59 diego Exp $
 
32
\*=========================================================================*/
 
33
 
 
34
#include "lua.h"
 
35
#include "lauxlib.h"
 
36
 
 
37
int auxiliar_open(lua_State *L);
 
38
void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func);
 
39
void auxiliar_add2group(lua_State *L, const char *classname, const char *group);
 
40
void auxiliar_setclass(lua_State *L, const char *classname, int objidx);
 
41
void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx);
 
42
void *auxiliar_checkgroup(lua_State *L, const char *groupname, int objidx);
 
43
void *auxiliar_getclassudata(lua_State *L, const char *groupname, int objidx);
 
44
void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx);
 
45
int auxiliar_checkboolean(lua_State *L, int objidx);
 
46
int auxiliar_tostring(lua_State *L);
 
47
 
 
48
#endif /* AUXILIAR_H */