~ubuntu-branches/ubuntu/saucy/luatex/saucy

« back to all changes in this revision

Viewing changes to source/texk/web2c/luatexdir/lua/llanglib.c

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2009-12-25 09:47:05 UTC
  • mfrom: (1.1.9 upstream) (4.2.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091225094705-y33rpflo8t4u9nag
Tags: 0.50.0-1
* new upstream release
* disable fix-hurd-ftbfs patch, included upstream
* disable upstram-fixes, included upstream
* disable ubuntu_libpoppler-0.11, not needed anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
   You should have received a copy of the GNU General Public License along
18
18
   with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */
19
19
 
20
 
#include "luatex-api.h"
 
20
#include "lua/luatex-api.h"
21
21
#include <ptexlib.h>
22
22
 
23
 
#include "nodes.h"
 
23
 
24
24
 
25
25
static const char _svn_version[] =
26
 
    "$Id: llanglib.c 2271 2009-04-12 23:42:21Z oneiros $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.40.6/source/texk/web2c/luatexdir/lua/llanglib.c $";
 
26
    "$Id: llanglib.c 2869 2009-07-16 11:31:18Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.50.0/source/texk/web2c/luatexdir/lua/llanglib.c $";
27
27
 
28
28
#define LANG_METATABLE "luatex.lang"
29
29
 
213
213
 
214
214
static int do_lang_hyphenate(lua_State * L)
215
215
{
216
 
    halfword *h, *t;
 
216
    halfword *h, *t, tt;
217
217
    h = check_isnode(L, 1);
218
218
    if (lua_isuserdata(L, 2)) {
219
219
        t = check_isnode(L, 2);
 
220
        tt = *t;
220
221
        lua_pop(L, 1);
221
222
    } else {
222
 
        t = h;
223
 
        while (vlink(*t) != null)
224
 
            *t = vlink(*t);
 
223
        tt = *h;
 
224
        while (vlink(tt) != null)
 
225
            tt = vlink(tt);
225
226
    }
226
 
    hnj_hyphenation(*h, *t);
 
227
    hnj_hyphenation(*h, tt);
227
228
    lua_pushboolean(L, 1);
228
229
    return 1;
229
230
}