~ubuntu-branches/ubuntu/intrepid/luatex/intrepid

« back to all changes in this revision

Viewing changes to src/libs/luasocket/src/lua_preload.c

  • 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
 
 
2
#include <stdlib.h>
 
3
#include "lua.h"
 
4
#include "lauxlib.h"
 
5
 
 
6
#include "socket_lua.c"
 
7
#include "ftp_lua.c"
 
8
#include "http_lua.c"
 
9
#include "smtp_lua.c"
 
10
#include "tp_lua.c"
 
11
#include "url_lua.c"
 
12
#include "ltn12_lua.c"
 
13
#include "mime_lua.c"
 
14
 
 
15
 
 
16
void luatex_socketlua_open (lua_State *L) {
 
17
  lua_getglobal(L, "package");
 
18
  lua_getfield(L, -1, "loaded");
 
19
  if (!lua_istable(L,-1)) {
 
20
    lua_newtable(L);
 
21
    lua_setfield(L, -2, "loaded");
 
22
    lua_getfield(L, -1, "loaded");
 
23
  }
 
24
   if(!luatex_socket_lua_open(L)) {
 
25
    lua_setfield(L, -2, "socket");    
 
26
  } else {
 
27
    fprintf(stderr,"FATAL error while preloading lua modules");
 
28
    exit(1);
 
29
  }
 
30
  if(!luatex_ltn12_lua_open(L)) {
 
31
    lua_setfield(L, -2, "ltn12");    
 
32
  } else {
 
33
    fprintf(stderr,"FATAL error while preloading lua modules");
 
34
    exit(1);
 
35
  }
 
36
  if(!luatex_mime_lua_open(L)) {
 
37
    lua_setfield(L, -2, "mime");    
 
38
  } else {
 
39
    fprintf(stderr,"FATAL error while preloading lua modules");
 
40
    exit(1);
 
41
  }
 
42
  if(!luatex_url_lua_open(L)) {
 
43
    lua_setfield(L, -2, "socket.url");    
 
44
  } else {
 
45
    fprintf(stderr,"FATAL error while preloading lua modules");
 
46
    exit(1);
 
47
  }
 
48
  if(!luatex_tp_lua_open(L)) {
 
49
    lua_setfield(L, -2, "socket.tp");    
 
50
  } else {
 
51
    fprintf(stderr,"FATAL error while preloading lua modules");
 
52
    exit(1);
 
53
  }
 
54
  if(!luatex_smtp_lua_open(L)) {
 
55
    lua_setfield(L, -2, "socket.smtp");    
 
56
  } else {
 
57
    fprintf(stderr,"FATAL error while preloading lua modules");
 
58
    exit(1);
 
59
  }
 
60
  if(!luatex_http_lua_open(L)) {
 
61
    lua_setfield(L, -2, "socket.http");    
 
62
  } else {
 
63
    fprintf(stderr,"FATAL error while preloading lua modules");
 
64
    exit(1);
 
65
  }
 
66
  if(!luatex_ftp_lua_open(L)) {
 
67
    lua_setfield(L, -2, "socket.ftp");    
 
68
  } else {
 
69
    fprintf(stderr,"FATAL error while preloading lua modules");
 
70
    exit(1);
 
71
  }
 
72
  lua_pop(L,2);
 
73
}