/* (c) Marietta Systems, Inc. * All rights reserved * * Demonstration program for the justify function */ #include "mtest.h" void main(){ int x = 2; byte p1[40]; static byte p2[30] = " 0a2b3,4.34-.67+2k4 "; clr_scrn("Justify test"); /* */ display("Source text: ", 2, 15, low); display(p2, 2, 28, alt_reverse); mk_wndw(5,14, 20,66, "Justified text"); /* * */ justify(left, p1, p2, 15, 0); display("left 15 ", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(left, p1, p2, 25, 0); display("left 25 ", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(right, p1, p2, 15, 0); display("right 15 ", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(right, p1, p2, 25, 0); display("right 25 ", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(as_typed, p1, p2, 15, 0); display("as_typed 15", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(center, p1, p2, 36, 0); display("center 36", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(code, p1, p2, 12, 0); display("code 12 ", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(code, p1, p2, 6, 0); display("code 6 ", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(decimal, p1, p2, 6, 2); display("decimal 6.2", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(decimal, p1, p2, 7, 5); display("decimal 7.5", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(c_number, p1, p2, 7, 1); display("c_number 7.1", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(decimal, p1, p2, 5, 0); display("decimal 5.0", x, 2, high); display(p1, x++, 14, alt_reverse); /* */ justify(c_number, p1, p2, 4, 5); display("c_number 4.5", x, 2, high); display(p1, x++, 14, alt_reverse); /* * */ while (!disp_qry(" Ready to finish")); goodbye(0); }