Skip to content

Commit

Permalink
Update curses documentation for luaposix integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
rrthomas committed Sep 11, 2011
1 parent 13abdea commit fd29c65
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ChangeLog:


LUA_ENV = LUA_INIT= LUA_PATH="$(abs_srcdir)/?.lua;;" LUA_CPATH="$(abs_builddir)/$(objdir)/?$(shrext);;" LUA_ENV = LUA_INIT= LUA_PATH="$(abs_srcdir)/?.lua;;" LUA_CPATH="$(abs_builddir)/$(objdir)/?$(shrext);;"


HTML = lcurses.html lcurses_c.html HTML = curses.html lcurses_c.html


LUATESTS = \ LUATESTS = \
$(srcdir)/tests-posix.lua \ $(srcdir)/tests-posix.lua \
Expand Down
35 changes: 12 additions & 23 deletions make_lcurses_doc.pl
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build lcurses documentation # Build luaposix curses documentation
# (c) Peter Billam 2011 # (c) Peter Billam 2011


# Permission is hereby granted, free of charge, to any person obtaining # Permission is hereby granted, free of charge, to any person obtaining
Expand Down Expand Up @@ -59,7 +59,7 @@
close O; close O;


my @P = (<DATA>); close P; my @P = (<DATA>); close P;
open(O, '>', 'lcurses.html') or die; open(O, '>', 'curses.html') or die;
foreach my $line (@P) { foreach my $line (@P) {
if ($line =~ /^<code>(\w+)\(/) { if ($line =~ /^<code>(\w+)\(/) {
my $s = $1; my $s = $1;
Expand Down Expand Up @@ -106,7 +106,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>lcurses documentation</title> <title>luaposix curses documentation</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" /> <link rev="made" href="mailto:root@localhost" />
<STYLE type="text/css"><!-- <STYLE type="text/css"><!--
Expand All @@ -117,7 +117,7 @@
<body style="background-color: white"> <body style="background-color: white">
<CENTER><H1> <CENTER><H1>
<FONT COLOR="#800000"><I>lcurses documentation</I></FONT> <FONT COLOR="#800000"><I>luaposix curses documentation</I></FONT>
</H1></CENTER> </H1></CENTER>
<!-- INDEX BEGIN --> <!-- INDEX BEGIN -->
Expand Down Expand Up @@ -150,7 +150,7 @@
<p> <p>
</p> </p>
<h2><a name="name">NAME</a></h2><DIV CLASS="txt"> <h2><a name="name">NAME</a></h2><DIV CLASS="txt">
<p><strong>lcurses</strong> &nbsp; - &nbsp; <p><strong>luaposix curses</strong> &nbsp; - &nbsp;
a C library for Lua 5.1 that wraps the curses API. a C library for Lua 5.1 that wraps the curses API.
</p><p></p> </p><p></p>
</DIV><h2><a name="synopsis">SYNOPSIS</a></h2><DIV CLASS="txt"> </DIV><h2><a name="synopsis">SYNOPSIS</a></h2><DIV CLASS="txt">
Expand All @@ -174,7 +174,7 @@
<p> <p>
</p> </p>
</DIV><h2><a name="description">DESCRIPTION</a></h2><DIV CLASS="txt"> </DIV><h2><a name="description">DESCRIPTION</a></h2><DIV CLASS="txt">
<p><code>lcurses</code> is the interface between Lua and your system's <code>ncurses</code> <p>luaposix <code>curses</code> is the interface between Lua and your system's <code>ncurses</code>
or <code>curses</code> library. For descriptions on the usage of a given function or <code>curses</code> library. For descriptions on the usage of a given function
or constant, consult your system's documentation, starting with or constant, consult your system's documentation, starting with
<code>man ncurses</code> or <code>man curses</code></p> <code>man ncurses</code> or <code>man curses</code></p>
Expand Down Expand Up @@ -470,34 +470,23 @@
For example, <code>addch()</code> has three other For example, <code>addch()</code> has three other
variants: <code>waddch()</code>, <code>mvaddch()</code>, variants: <code>waddch()</code>, <code>mvaddch()</code>,
and <code>mvwaddch()</code>. and <code>mvwaddch()</code>.
The Perl Curses module combines these variants into one
&quot;Unified Function&quot;
which detects how many arguments it has and behaves accordingly.
But with this Lua module you must always specify the window
(because it is the Object)
e.g.: <code>stdscr:addch()</code>,
and so the <code>mv-</code> variant is retained.
If you are translating Perl code into Lua you may wish to use
<A HREF="uf.txt">some wrapper functions</A>.
</p><p></p> </p><p></p>
</DIV><h2><a name="installation">INSTALLATION</a></h2><DIV CLASS="txt"> </DIV><h2><a name="installation">INSTALLATION</a></h2><DIV CLASS="txt">
<pre> <pre>
luarocks install lcurses</pre> luarocks install luaposix</pre>
<p></p> <p></p>
</DIV><h2><a name="author">AUTHOR</a></h2><DIV CLASS="txt"> </DIV><h2><a name="author">AUTHOR</a></h2><DIV CLASS="txt">
<p><B>lcurses</B> was written by &nbsp; Reuben Thomas &nbsp; <p><B>luaposix curses</B> was originally written by Tiago Dionizio, and is maintained by Reuben Thomas at
<a href="http://github.com/rrthomas/lcurses"> <a href="http://github.com/rrthomas/luaposix">
http://github.com/rrthomas/lcurses</a><BR> http://github.com/rrthomas/luaposix</a><BR>
This documentation was created by This documentation was created by
<A HREF="make_lcurses_doc">a script</A> <A HREF="make_lcurses_doc">a script</A>
written by written by
<A HREF="http://www.pjb.com.au">Peter Billam</A>. <A HREF="http://www.pjb.com.au">Peter Billam</A>.
</p><p></p> </p><p></p>
</DIV><h2><a name="see_also">SEE ALSO</a></h2><DIV CLASS="txt"> </DIV><h2><a name="see_also">SEE ALSO</a></h2><DIV CLASS="txt">
<pre><a href="http://github.com/rrthomas/lcurses">http://github.com/rrthomas/lcurses</a> <a href="http://luaforge.net/projects/luaposix/">http://luaforge.net/projects/luaposix/</a>
<a href="http://luaforge.net/projects/lcurses/">http://luaforge.net/projects/lcurses/</a> <a href="http://luarocks.org/repositories/rocks/index.html#luaposix">http://luarocks.org/repositories/rocks/index.html#luaposix</a>
<a href="http://luarocks.org/repositories/rocks/index.html#lcurses">http://luarocks.org/repositories/rocks/index.html#lcurses</a>
<a href="http://luaforge.net/frs/download.php/4823/lcurses-6.tar.gz">http://luaforge.net/frs/download.php/4823/lcurses-6.tar.gz</a>
<a href="http://git.savannah.gnu.org/cgit/zile.git/tree/src/term_curses.lua?h=lua">http://git.savannah.gnu.org/cgit/zile.git/tree/src/term_curses.lua?h=lua</a> <a href="http://git.savannah.gnu.org/cgit/zile.git/tree/src/term_curses.lua?h=lua">http://git.savannah.gnu.org/cgit/zile.git/tree/src/term_curses.lua?h=lua</a>
<a href="http://search.cpan.org/perldoc?Curses">http://search.cpan.org/perldoc?Curses</a> <a href="http://search.cpan.org/perldoc?Curses">http://search.cpan.org/perldoc?Curses</a>
man ncurses man ncurses
Expand Down

0 comments on commit fd29c65

Please sign in to comment.