rsys

Basic data structures and low-level features
git clone git://git.meso-star.fr/rsys.git
Log | Files | Refs | README | LICENSE

test_vmacros.c (1433B)


      1 /* Copyright (C) 2013-2023, 2025 Vincent Forest (vaplv@free.fr)
      2  *
      3  * The RSys library is free software: you can redistribute it and/or modify
      4  * it under the terms of the GNU General Public License as published
      5  * by the Free Software Foundation, either version 3 of the License, or
      6  * (at your option) any later version.
      7  *
      8  * The RSys library is distributed in the hope that it will be useful,
      9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     11  * GNU General Public License for more details.
     12  *
     13  * You should have received a copy of the GNU General Public License
     14  * along with the RSys library. If not, see <http://www.gnu.org/licenses/>. */
     15 
     16 #include "rsys.h"
     17 
     18 int
     19 main(int argc, char** argv)
     20 {
     21   (void)argc, (void)argv;
     22   #define PRINTF(Fmt, Args) printf(Fmt COMMA_##Args LIST_##Args)
     23   PRINTF("Arg0\n", ARG0());
     24   PRINTF("Arg1 %d\n", ARG1(1));
     25   PRINTF("Arg2 %d %d\n", ARG2(1, 2));
     26   PRINTF("Arg3 %d %d %d\n", ARG3(1, 2, 3));
     27   PRINTF("Arg4 %d %d %d %d\n", ARG4(1, 2, 3, 4));
     28   PRINTF("Arg5 %d %d %d %d %d\n", ARG5(1, 2, 3, 4, 5));
     29   PRINTF("Arg6 %d %d %d %d %d %d\n", ARG6(1, 2, 3, 4, 5, 6));
     30   PRINTF("Arg7 %d %d %d %d %d %d %d\n", ARG7(1, 2, 3, 4, 5, 6, 7));
     31   PRINTF("Arg8 %d %d %d %d %d %d %d %d\n", ARG8(1, 2, 3, 4, 5, 6, 7, 8));
     32   PRINTF("Arg9 %d %d %d %d %d %d %d %d %d\n", ARG9(1, 2, 3, 4, 5, 6, 7, 8, 9));
     33   #undef PRINTF
     34   return 0;
     35 }