! show_one_table.MBS
! Show a single table of ranges of Hershey glyphs, 
! 8 ranges by 8 ranges maximum possible size,
! at (0,0) in a local coordinate system.
! The tables are defined in file "list_tables_occidental.txt".

local drawing module show_one_table(
int    table_number;
int    toplevel;         ! 0 = false = not top level; 1 = true = top level
int    box_visibility;   ! 0 = plain = invisible (no boxes); 1 = boxed = visible
int    verbosity);

int    rc;
string table_name*132;

beginmodule

! Check that the table exists and get its name.
! (The name is actually redundant, since display_table will also
! call check_table to get table data, including the name.)
part(#1,check_table(table_number, rc, table_name, verbosity));
if rc <> 0 then
   if verbosity > 0 then
      lst_lin("show_one_table: table number " +
              str(table_number,1,0) + " not found");
   endif;
   goto fail;
endif;

! Create a coordinate system in which to show the table.
csys_1p(#2,"table",vec(0,0):blank=1);

! display the table
part(#3,display_table(table_number, toplevel, box_visibility,
                      verbosity), #2);

fail:;

endmodule

! Copyright 2003-2005 by David M. MacMillan

! This work is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.

! NOTICE OF DISCLAIMER OF WARRANTY AND LIABILITY:

! This work is distributed WITHOUT ANY WARRANTY;
! without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
! See the GNU General Public License for more details.

! In no event will the author(s), editor(s), or publisher(s) of this work
! be liable to you or to any other party for damages,
! including but not limited to any general, special, incidental
! or consequential damages arising out of your use of or inability to use this
! work or the information contained in it, even if you have been advised
! of the possibility of such damages.

! In no event will the author(s), editor(s), or publisher(s) of this work
! be liable to you or to any other party for any injury, death,
! disfigurement, or other personal damage arising out of your use of
! or inability to use this work or the information
! contained in it, even if you have been advised of the
! possibility of such injury, death, disfigurement, or other
! personal damage.

! You should have received a copy of the GNU General Public License
! along with this work; if not, write to the
! Free Software Foundation, Inc., 59 Temple Place - Suite 330,
! Boston, MA  02111-1307, USA.

