"Fossies" - the Fresh Open Source Software Archive

Member "dateutils-0.4.6/test/itostr-2.c" (19 Mar 2019, 1596 Bytes) of package /linux/privat/dateutils-0.4.6.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #include <stdio.h>
    2 #include "strops.h"
    3 #include "nifty.h"
    4 
    5 int
    6 main(void)
    7 {
    8     static char buf[32U];
    9 
   10     buf[ui999topstr(buf, 32U, 123U, 3U, 0)] = '\0';
   11     puts(buf);
   12     buf[ui999topstr(buf, 32U, 23U, 3U, ' ')] = '\0';
   13     puts(buf);
   14     buf[ui999topstr(buf, 32U, 10U, 3U, ' ')] = '\0';
   15     puts(buf);
   16     buf[ui999topstr(buf, 32U, 0U, 3U, ' ')] = '\0';
   17     puts(buf);
   18     buf[ui999topstr(buf, 32U, 1U, 3U, '0')] = '\0';
   19     puts(buf);
   20     buf[ui999topstr(buf, 32U, 123U, 3U, '0')] = '\0';
   21     puts(buf);
   22     buf[ui999topstr(buf, 32U, 23U, 1U, ' ')] = '\0';
   23     puts(buf);
   24     buf[ui999topstr(buf, 32U, 3U, 1U, ' ')] = '\0';
   25     puts(buf);
   26 
   27     puts("");
   28 
   29     buf[ui999topstr(buf, 32U, 123U, 2U, 0)] = '\0';
   30     puts(buf);
   31     buf[ui999topstr(buf, 32U, 23U, 2U, ' ')] = '\0';
   32     puts(buf);
   33     buf[ui999topstr(buf, 32U, 10U, 2U, ' ')] = '\0';
   34     puts(buf);
   35     buf[ui999topstr(buf, 32U, 0U, 2U, ' ')] = '\0';
   36     puts(buf);
   37     buf[ui999topstr(buf, 32U, 1U, 2U, '0')] = '\0';
   38     puts(buf);
   39     buf[ui999topstr(buf, 32U, 123U, 2U, '0')] = '\0';
   40     puts(buf);
   41     buf[ui999topstr(buf, 32U, 23U, 1U, ' ')] = '\0';
   42     puts(buf);
   43     buf[ui999topstr(buf, 32U, 3U, 1U, ' ')] = '\0';
   44     puts(buf);
   45 
   46     puts("");
   47 
   48     buf[ui999topstr(buf, 2U, 123U, 2U, 0)] = '\0';
   49     puts(buf);
   50     buf[ui999topstr(buf, 1U, 23U, 2U, 0)] = '\0';
   51     puts(buf);
   52     buf[ui999topstr(buf, 1U, 10U, 2U, 0)] = '\0';
   53     puts(buf);
   54     buf[ui999topstr(buf, 1U, 0U, 2U, 0)] = '\0';
   55     puts(buf);
   56     buf[ui999topstr(buf, 1U, 1U, 2U, 0)] = '\0';
   57     puts(buf);
   58     buf[ui999topstr(buf, 1U, 123U, 1U, 0)] = '\0';
   59     puts(buf);
   60     buf[ui999topstr(buf, 2U, 23U, 1U, 0)] = '\0';
   61     puts(buf);
   62     buf[ui999topstr(buf, 1U, 3U, 1U, 0)] = '\0';
   63     puts(buf);
   64     return 0;
   65 }