Annotation of embedaddon/rsync/case_N.h, revision 1.1.1.4

1.1       misho       1: /*
                      2:  * Allow an arbitrary sequence of case labels.
                      3:  *
1.1.1.4 ! misho       4:  * Copyright (C) 2006-2020 Wayne Davison
1.1       misho       5:  *
                      6:  * This program is free software; you can redistribute it and/or modify
                      7:  * it under the terms of the GNU General Public License as published by
                      8:  * the Free Software Foundation; either version 3 of the License, or
                      9:  * (at your option) any later version.
                     10:  *
                     11:  * This program is distributed in the hope that it will be useful,
                     12:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
                     13:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     14:  * GNU General Public License for more details.
                     15:  *
                     16:  * You should have received a copy of the GNU General Public License along
                     17:  * with this program; if not, visit the http://fsf.org website.
                     18:  */
                     19: 
1.1.1.4 ! misho      20: /* This is included multiple times, once for every segment in a switch statement.
1.1       misho      21:  * This produces the next "case N:" statement in sequence. */
                     22: 
                     23: #if !defined CASE_N_STATE_0
                     24: #define CASE_N_STATE_0
                     25:        case 0:
                     26: #elif !defined CASE_N_STATE_1
                     27: #define CASE_N_STATE_1
1.1.1.4 ! misho      28:        /* FALLTHROUGH */
1.1       misho      29:        case 1:
                     30: #elif !defined CASE_N_STATE_2
                     31: #define CASE_N_STATE_2
1.1.1.4 ! misho      32:        /* FALLTHROUGH */
1.1       misho      33:        case 2:
                     34: #elif !defined CASE_N_STATE_3
                     35: #define CASE_N_STATE_3
1.1.1.4 ! misho      36:        /* FALLTHROUGH */
1.1       misho      37:        case 3:
                     38: #elif !defined CASE_N_STATE_4
                     39: #define CASE_N_STATE_4
1.1.1.4 ! misho      40:        /* FALLTHROUGH */
1.1       misho      41:        case 4:
                     42: #elif !defined CASE_N_STATE_5
                     43: #define CASE_N_STATE_5
1.1.1.4 ! misho      44:        /* FALLTHROUGH */
1.1       misho      45:        case 5:
                     46: #elif !defined CASE_N_STATE_6
                     47: #define CASE_N_STATE_6
1.1.1.4 ! misho      48:        /* FALLTHROUGH */
1.1       misho      49:        case 6:
                     50: #elif !defined CASE_N_STATE_7
                     51: #define CASE_N_STATE_7
1.1.1.4 ! misho      52:        /* FALLTHROUGH */
1.1       misho      53:        case 7:
                     54: #elif !defined CASE_N_STATE_8
                     55: #define CASE_N_STATE_8
1.1.1.4 ! misho      56:        /* FALLTHROUGH */
1.1       misho      57:        case 8:
                     58: #elif !defined CASE_N_STATE_9
                     59: #define CASE_N_STATE_9
1.1.1.4 ! misho      60:        /* FALLTHROUGH */
1.1       misho      61:        case 9:
                     62: #elif !defined CASE_N_STATE_10
                     63: #define CASE_N_STATE_10
1.1.1.4 ! misho      64:        /* FALLTHROUGH */
1.1       misho      65:        case 10:
                     66: #elif !defined CASE_N_STATE_11
                     67: #define CASE_N_STATE_11
1.1.1.4 ! misho      68:        /* FALLTHROUGH */
1.1       misho      69:        case 11:
                     70: #elif !defined CASE_N_STATE_12
                     71: #define CASE_N_STATE_12
1.1.1.4 ! misho      72:        /* FALLTHROUGH */
1.1       misho      73:        case 12:
                     74: #elif !defined CASE_N_STATE_13
                     75: #define CASE_N_STATE_13
1.1.1.4 ! misho      76:        /* FALLTHROUGH */
1.1       misho      77:        case 13:
                     78: #elif !defined CASE_N_STATE_14
                     79: #define CASE_N_STATE_14
1.1.1.4 ! misho      80:        /* FALLTHROUGH */
1.1       misho      81:        case 14:
                     82: #elif !defined CASE_N_STATE_15
                     83: #define CASE_N_STATE_15
1.1.1.4 ! misho      84:        /* FALLTHROUGH */
1.1       misho      85:        case 15:
                     86: #elif !defined CASE_N_STATE_16
                     87: #define CASE_N_STATE_16
1.1.1.4 ! misho      88:        /* FALLTHROUGH */
1.1       misho      89:        case 16:
                     90: #else
                     91: #error Need to add more case statements!
                     92: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>