2 * pzasusb8 - print numereator as a string of USB8s
4 * Copyright (C) 1999,2004 Ernest Bowen and Landon Curt Noll
6 * Primary author: Ernest Bowen
8 * Calc is open software; you can redistribute it and/or modify it under
9 * the terms of the version 2.1 of the GNU Lesser General Public License
10 * as published by the Free Software Foundation.
12 * Calc is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
15 * Public License for more details.
17 * A copy of version 2.1 of the GNU Lesser General Public License is
18 * distributed with calc under the filename COPYING-LGPL. You should have
19 * received a copy with calc; if not, write to Free Software Foundation, Inc.
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * @(#) $Revision: 30.1 $
23 * @(#) $Id: pzasusb8.cal,v 30.1 2007/03/16 11:10:04 chongo Exp $
24 * @(#) $Source: /usr/local/src/bin/calc/custom/RCS/pzasusb8.cal,v $
26 * Under source code control: 1999/10/06 03:11:12
27 * File existed as early as: 1998
29 * chongo <was here> /\oo/\ http://www.isthe.com/chongo/
30 * Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
37 if (config("compile_custom") == 0) {
38 quit "calc compiled without -DCUSTOM";
39 } else if (config("allow_custom") == 0) {
40 quit "calc was run without the -D command line option";
43 print "p(n) prints array in which numerator of n is stored as a";
44 print "sequence of 2-hex-digits representing unsigned characters.";
45 print "h(n) printx n in hex notation. This should be the same as";
46 print "p(n) except for (1) its leading 0x, (2) possible trailing zeros";
47 print "in p(n), and (3) the order of the hex-digit pairs.";
48 print "The following example show results for n = isqrt(2e100).";
51 define p(n) {custom("pzasusb8", n); print;}
52 define h(n) = printf("%x\n", n);
59 print "BASEB: ", custom("sysinfo", "BASEB");
60 print "CALC_BYTE_ORDER: ", custom("sysinfo", "CALC_BYTE_ORDER");
61 print "BIG_ENDIAN: ", custom("sysinfo", "BIG_ENDIAN");
62 print "LITTLE_ENDIAN: ", custom("sysinfo", "LITTLE_ENDIAN");
63 print "LONG_BITS: ", custom("sysinfo", "LONG_BITS");