sf                303 src/dps8/dps8_decimal.c 
sf                400 src/dps8/dps8_decimal.c 
sf                429 src/dps8/dps8_decimal.c 
sf                472 src/dps8/dps8_decimal.c 
sf                494 src/dps8/dps8_decimal.c 
sf                715 src/dps8/dps8_decimal.c char *formatDecimal (uint8_t * out, decContext *set, decNumber *r, int nout, int s, int sf, bool R, bool *OVR, bool *TRUNC) {
sf                730 src/dps8/dps8_decimal.c     if (sf != r->exponent) {
sf                733 src/dps8/dps8_decimal.c         if (sf > r->exponent) // ET 330: truncation due to: output sf > input sf or exponent
sf                736 src/dps8/dps8_decimal.c       decNumberFromInt32 (& _sf, sf);
sf                750 src/dps8/dps8_decimal.c       if (r->exponent > sf)
sf                751 src/dps8/dps8_decimal.c         set->digits = min (DECNUMDIGITS, max (set->digits, r->digits + r->exponent - sf));
sf                775 src/dps8/dps8_decimal.c     if (nout + min (sf,0) < r2digits) {
sf                778 src/dps8/dps8_decimal.c       set->digits = r2digits - (nout + min (sf,0));
sf                 47 src/dps8/dps8_decimal.h                     int sf, bool R, bool *OVR, bool *TRUNC);
sf               10324 src/dps8/dps8_eis.c         int sf = e->S3==CSFL?op3->exponent:e->SF3;
sf               10327 src/dps8/dps8_eis.c         if (sf>0) {     // optimize: we don't care when sf>0
sf               10333 src/dps8/dps8_eis.c         if (op3->digits - min(max(sf,0),ctz) > 63) {
sf               10340 src/dps8/dps8_eis.c             set.digits = op3->digits - min(max(sf,0),ctz) - 63;
sf               10715 src/dps8/dps8_eis.c         int sf = e->S3==CSFL?op3->exponent:e->SF3;
sf               10718 src/dps8/dps8_eis.c         if (sf>0) {     // optimize: we don't care when sf>0
sf               10724 src/dps8/dps8_eis.c         if (op3->digits - min(max(sf,0),ctz) > 63) {
sf               10731 src/dps8/dps8_eis.c             set.digits = op3->digits - min(max(sf,0),ctz) - 63;
sf               11036 src/dps8/dps8_eis.c         int sf = e->S3==CSFL?op3->exponent:e->SF3;
sf               11039 src/dps8/dps8_eis.c         if (sf>0) {     // optimize: we don't care when sf>0
sf               11045 src/dps8/dps8_eis.c         if (op3->digits - min(max(sf,0),ctz) > 63) {
sf               11052 src/dps8/dps8_eis.c             set.digits = op3->digits - min(max(sf,0),ctz) - 63;
sf               11377 src/dps8/dps8_eis.c         int sf = e->S3==CSFL?op3->exponent:e->SF3;
sf               11380 src/dps8/dps8_eis.c         if (sf>0) {     // optimize: we don't care when sf>0
sf               11386 src/dps8/dps8_eis.c         if (op3->digits - min(max(sf,0),ctz) > 63) {
sf               11393 src/dps8/dps8_eis.c             set.digits = op3->digits - min(max(sf,0),ctz) - 63;
sf               12373 src/dps8/dps8_eis.c 
sf               12473 src/dps8/dps8_eis.c 
sf               12503 src/dps8/dps8_eis.c 
sf               12546 src/dps8/dps8_eis.c 
sf               12570 src/dps8/dps8_eis.c 
sf                 45 src/libsir/include/sir/filecache.h bool _sirfile_open(sirfile* sf);
sf                 46 src/libsir/include/sir/filecache.h void _sirfile_close(sirfile* sf);
sf                 47 src/libsir/include/sir/filecache.h bool _sirfile_write(sirfile* sf, const char* output);
sf                 48 src/libsir/include/sir/filecache.h bool _sirfile_writeheader(sirfile* sf, const char* msg);
sf                 49 src/libsir/include/sir/filecache.h bool _sirfile_needsroll(sirfile* sf);
sf                 50 src/libsir/include/sir/filecache.h bool _sirfile_roll(sirfile* sf, char** newpath);
sf                 51 src/libsir/include/sir/filecache.h void _sirfile_rollifneeded(sirfile* sf);
sf                 52 src/libsir/include/sir/filecache.h bool _sirfile_archive(sirfile* sf, const char* newpath);
sf                 53 src/libsir/include/sir/filecache.h bool _sirfile_splitpath(const sirfile* sf, char** name, char** ext);
sf                 54 src/libsir/include/sir/filecache.h void _sirfile_destroy(sirfile** sf);
sf                 55 src/libsir/include/sir/filecache.h bool _sirfile_validate(const sirfile* sf);
sf                 56 src/libsir/include/sir/filecache.h bool _sirfile_update(sirfile* sf, const sir_update_config_data* data);
sf                 85 src/libsir/src/sirfilecache.c     sirfile* sf = (sirfile*)calloc(1, sizeof(sirfile));
sf                 86 src/libsir/src/sirfilecache.c     if (!sf) {
sf                 91 src/libsir/src/sirfilecache.c     sf->path = strndup(path, strnlen(path, SIR_MAXPATH));
sf                 92 src/libsir/src/sirfilecache.c     if (!sf->path) {
sf                 94 src/libsir/src/sirfilecache.c         _sir_safefree(&sf);
sf                 98 src/libsir/src/sirfilecache.c     sf->levels = levels;
sf                 99 src/libsir/src/sirfilecache.c     sf->opts   = opts;
sf                101 src/libsir/src/sirfilecache.c     if (!_sirfile_open(sf) || !_sirfile_validate(sf)) {
sf                102 src/libsir/src/sirfilecache.c         _sirfile_destroy(&sf);
sf                106 src/libsir/src/sirfilecache.c     return sf;
sf                109 src/libsir/src/sirfilecache.c bool _sirfile_open(sirfile* sf) {
sf                110 src/libsir/src/sirfilecache.c     bool retval = _sir_validptr(sf) && _sir_validstr(sf->path);
sf                114 src/libsir/src/sirfilecache.c         retval = _sir_openfile(&f, sf->path, SIR_FOPENMODE, SIR_PATH_REL_TO_CWD);
sf                116 src/libsir/src/sirfilecache.c             _sirfile_close(sf);
sf                118 src/libsir/src/sirfilecache.c             sf->f  = f;
sf                119 src/libsir/src/sirfilecache.c             sf->id = FNV32_1a((const uint8_t*)sf->path, strnlen(sf->path, SIR_MAXPATH));
sf                126 src/libsir/src/sirfilecache.c void _sirfile_close(sirfile* sf) {
sf                127 src/libsir/src/sirfilecache.c     if (_sir_validptrnofail(sf))
sf                128 src/libsir/src/sirfilecache.c         _sir_safefclose(&sf->f);
sf                131 src/libsir/src/sirfilecache.c bool _sirfile_write(sirfile* sf, const char* output) {
sf                132 src/libsir/src/sirfilecache.c     bool retval = _sirfile_validate(sf) && _sir_validstr(output);
sf                135 src/libsir/src/sirfilecache.c         if (sf->writes_since_size_chk++ > SIR_FILE_CHK_SIZE_WRITES) {
sf                136 src/libsir/src/sirfilecache.c             sf->writes_since_size_chk = 0;
sf                137 src/libsir/src/sirfilecache.c             _sirfile_rollifneeded(sf);
sf                141 src/libsir/src/sirfilecache.c         size_t wrote    = fwrite(output, sizeof(char), writeLen, sf->f);
sf                147 src/libsir/src/sirfilecache.c             clearerr(sf->f);
sf                156 src/libsir/src/sirfilecache.c bool _sirfile_writeheader(sirfile* sf, const char* msg) {
sf                157 src/libsir/src/sirfilecache.c     bool retval = _sirfile_validate(sf) && _sir_validstr(msg);
sf                171 src/libsir/src/sirfilecache.c         retval = _sirfile_write(sf, header);
sf                177 src/libsir/src/sirfilecache.c bool _sirfile_needsroll(sirfile* sf) {
sf                178 src/libsir/src/sirfilecache.c     bool retval = _sirfile_validate(sf);
sf                182 src/libsir/src/sirfilecache.c         int getstat    = fstat(fileno(sf->f), &st);
sf                185 src/libsir/src/sirfilecache.c             getstat = stat(sf->path, &st);
sf                197 src/libsir/src/sirfilecache.c bool _sirfile_roll(sirfile* sf, char** newpath) {
sf                198 src/libsir/src/sirfilecache.c     if (!_sirfile_validate(sf) || !_sir_validptrptr(newpath))
sf                205 src/libsir/src/sirfilecache.c     bool split = _sirfile_splitpath(sf, &name, &ext);
sf                261 src/libsir/src/sirfilecache.c                                         " not rolling!", sf->path);
sf                263 src/libsir/src/sirfilecache.c                     retval = resolved && _sirfile_archive(sf, *newpath);
sf                275 src/libsir/src/sirfilecache.c void _sirfile_rollifneeded(sirfile* sf) {
sf                276 src/libsir/src/sirfilecache.c     if (_sirfile_validate(sf) && _sirfile_needsroll(sf)) {
sf                281 src/libsir/src/sirfilecache.c             " rolling...", sf->path, sf->id, SIR_FROLLSIZE);
sf                283 src/libsir/src/sirfilecache.c         _sir_fflush(sf->f);
sf                285 src/libsir/src/sirfilecache.c         if (_sirfile_roll(sf, &newpath)) {
sf                288 src/libsir/src/sirfilecache.c             rolled = _sirfile_writeheader(sf, header);
sf                294 src/libsir/src/sirfilecache.c                 sf->path, sf->id);
sf                298 src/libsir/src/sirfilecache.c bool _sirfile_archive(sirfile* sf, const char* newpath) {
sf                299 src/libsir/src/sirfilecache.c     bool retval = _sirfile_validate(sf) && _sir_validstr(newpath);
sf                304 src/libsir/src/sirfilecache.c         _sirfile_close(sf);
sf                306 src/libsir/src/sirfilecache.c         if (0 != rename(sf->path, newpath)) {
sf                309 src/libsir/src/sirfilecache.c             retval = _sirfile_open(sf);
sf                311 src/libsir/src/sirfilecache.c                 _sir_selflog("archived '%s' " SIR_R_ARROW " '%s'", sf->path, newpath);
sf                318 src/libsir/src/sirfilecache.c bool _sirfile_splitpath(const sirfile* sf, char** name, char** ext) {
sf                324 src/libsir/src/sirfilecache.c     bool retval = _sirfile_validate(sf) && _sir_validptrptr(name) && _sir_validptrptr(ext);
sf                327 src/libsir/src/sirfilecache.c         char* tmp = strndup(sf->path, strnlen(sf->path, SIR_MAXPATH));
sf                344 src/libsir/src/sirfilecache.c             *ext = strndup(sf->path + namesize, strnlen(sf->path + namesize, SIR_MAXPATH));
sf                347 src/libsir/src/sirfilecache.c             *name = strndup(sf->path, strnlen(sf->path, SIR_MAXPATH));
sf                357 src/libsir/src/sirfilecache.c void _sirfile_destroy(sirfile** sf) {
sf                358 src/libsir/src/sirfilecache.c     if (sf && *sf) {
sf                359 src/libsir/src/sirfilecache.c         _sirfile_close(*sf);
sf                360 src/libsir/src/sirfilecache.c         _sir_safefree(&(*sf)->path);
sf                361 src/libsir/src/sirfilecache.c         _sir_safefree(sf);
sf                365 src/libsir/src/sirfilecache.c bool _sirfile_validate(const sirfile* sf) {
sf                366 src/libsir/src/sirfilecache.c     return _sir_validptrnofail(sf) && _sir_validptrnofail(sf->f) &&
sf                367 src/libsir/src/sirfilecache.c            _sir_validstrnofail(sf->path) && _sir_validfileid(sf->id);
sf                370 src/libsir/src/sirfilecache.c bool _sirfile_update(sirfile* sf, const sir_update_config_data* data) {
sf                371 src/libsir/src/sirfilecache.c     bool retval = _sirfile_validate(sf);
sf                376 src/libsir/src/sirfilecache.c             if (sf->levels != *data->levels) {
sf                378 src/libsir/src/sirfilecache.c                             " to %04"PRIx16, sf->id, sf->levels, *data->levels);
sf                379 src/libsir/src/sirfilecache.c                 sf->levels = *data->levels;
sf                382 src/libsir/src/sirfilecache.c                             " levels: %04"PRIx16, sf->id, sf->levels);
sf                389 src/libsir/src/sirfilecache.c             if (sf->opts != *data->opts) {
sf                391 src/libsir/src/sirfilecache.c                             " to %08"PRIx32, sf->id, sf->opts, *data->opts);
sf                392 src/libsir/src/sirfilecache.c                 sf->opts = *data->opts;
sf                395 src/libsir/src/sirfilecache.c                             " options: %08"PRIx32, sf->id, sf->opts);
sf                423 src/libsir/src/sirfilecache.c     sirfile* sf = _sirfile_create(path, levels, opts);
sf                424 src/libsir/src/sirfilecache.c     if (_sirfile_validate(sf)) {
sf                426 src/libsir/src/sirfilecache.c             sf->path, sf->id, sfc->count + 1);
sf                428 src/libsir/src/sirfilecache.c         sfc->files[sfc->count++] = sf;
sf                430 src/libsir/src/sirfilecache.c         if (!_sir_bittest(sf->opts, SIRO_NOHDR) && !_sirfile_writeheader(sf, SIR_FHBEGIN))
sf                432 src/libsir/src/sirfilecache.c                 sf->path, sf->id);
sf                434 src/libsir/src/sirfilecache.c         return sf->id;
sf                437 src/libsir/src/sirfilecache.c     _sir_safefree(&sf);