#include #ifdef BN_MP_FWRITE_C /* LibTomMath, multiple-precision integer library -- Tom St Denis * * LibTomMath is a library that provides multiple-precision * integer arithmetic as well as number theoretic functionality. * * The library was designed directly after the MPI library by * Michael Fromberger but has been written from scratch with * additional optimizations in place. * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com */ int mp_fwrite(mp_int *a, int radix, FILE *stream) { char *buf; int err, len, x; if ((err = mp_radix_size(a, radix, &len)) != MP_OKAY) { return err; } buf = OPT_CAST(char) XMALLOC (len); if (buf == NULL) { return MP_MEM; } if ((err = mp_toradix(a, buf, radix)) != MP_OKAY) { XFREE (buf); return err; } for (x = 0; x < len; x++) { if (fputc(buf[x], stream) == EOF) { XFREE (buf); return MP_VAL; } } XFREE (buf); return MP_OKAY; } #endif /* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_fwrite.c,v $ */ /* $Revision: 1.1.1.3 $ */ /* $Date: 2006/12/01 00:08:11 $ */ vestate_nre_excised_variant_1_roll_forward Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* (Backport) Fix [Bug 2891556] and improve test to detect similar ↵ferrieux2009-11-163-7/+29
| | | | manifestations in the future.
* * generic/tclIO.c (CopyData): [Bug 2895565]. Dropped bogosityandreas_kupries2009-11-123-7/+52
| | | | | | * tests/io.test: which used the number of _written_ bytes or character to update the counters for the read bytes/characters. New test io-53.11. This is a backward port from the 8.5 branch.
* Fixed a number of test issues for Vista and Win7.patthoyts2009-11-105-263/+337
| | | | | These test failures are due to the more restrictive permissions on the newer versions of Windows.
* Removed outdated Msys + Mingw info, fix for [Bug 2459744].stwo2009-11-102-10/+5
|
* * generic/tclObj.c: Plus memory leak in TclContinuationsEnter().andreas_kupries2009-11-102-1/+17
| | | | [Bug 2895323]. Backport from Tcl 8.5 branch, change by Don Porter.
* * tests/info.test: Resolve ambiguous resolution of variableandreas_kupries2009-11-092-2/+5
| | | | "res". Backport from 8.5
* * generic/tclBasic.c (TclEvalObjEx): Moved the #280 decrement ofandreas_kupries2009-11-092-6/+13
| | | | | | | refCount for the file path out of the branch after the whole conditional, closing a memory leak. Added clause on structure type to prevent seg.faulting. Backport from valgrinding the Tcl 8.5 branch.
* compiler warning build break fixJoe Mistachkin2009-11-021-2/+2
|
* * generic/tclCompCmds.c: [Bug 2881263] (TclCompileForeachCmd,andreas_kupries2009-10-232-3/+9
| | | | | | TclCompileLindexCmd): Fixed. Moved the use of DefineLineInformation after all regular variable declarations, so that an empty statement (-UTIP_280) doesn't confuse c89 compilers.
* * library/platform/pkgIndex.tcl: Backported the platform packagesandreas_kupries2009-10-236-4/+569
| | | | | | | * library/platform/platform.tcl: from head and8.5 into the 8.4 * library/platform/shell.tcl: branch. Updated makefiles to install * unix/Makfile.in: the packages. * win/Makefile.in:
* * generic/tclIO.c (FlushChannel): Skip OutputProc for low-levelandreas_kupries2009-10-232-2/+13
| | | | | | 0-length writes. When closing pipes which have already been closed not skipping leads to spurious SIG_PIPE signals. Reported by Mikhail Teterin <mi+thun@aldan.algebra.com>.
* Fix [Bug 2882561].dkf2009-10-212-14/+19
|
* Fix for [Bug 1565466]Joe Mistachkin2009-10-182-4/+15
|
* * macosx/tclMacOSXBundle.c: Workaround CF memory managment bug indas2009-10-053-16/+33
| | | | * unix/tclUnixInit.c: Mac OS X 10.4 & earlier. [Bug 2569449]
* fix typosdas2009-10-051-3/+3
|
* * generic/tclAlloc.c: Cleaned up various routines in thedgp2009-09-285-16/+65
| | | | | | | * generic/tclCkalloc.c: call stacks for memory allocation to * generic/tclParse.c: guarantee that any size values computed * generic/tclThreadAlloc.c: are within the domains of the routines they get passed to. [Bugs 2557696 and 2557796].
* * generic/tclCmdMZ.c (Tcl_SubstObj): Pass 'length' values todgp2009-09-182-3/+9
| | | | | recursive parsing calls to convert O(N^2) operations of [subst] to O(N).
* silence compiler warningsdgp2009-08-262-4/+4
|
* * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-25