Home | History | Annotate | Line # | Download | only in indent
opt_T.c revision 1.3
      1 /* $NetBSD: opt_T.c,v 1.3 2022/04/22 21:21:20 rillig Exp $ */
      2 
      3 /*
      4  * Tests for the option '-T', which specifies a single identifier that indent
      5  * will recognize as a type name.  This affects the formatting of
      6  * syntactically ambiguous expressions that could be casts or multiplications,
      7  * among others.
      8  */
      9 
     10 #indent input
     11 int cast = (custom_type_name)   *   arg;
     12 
     13 int mult = (unknown_type_name)   *   arg;
     14 
     15 /* See the option -ta for handling these types. */
     16 int suff = (unknown_type_name_t)   *   arg;
     17 #indent end
     18 
     19 #indent run -Tcustom_type_name -di0
     20 int cast = (custom_type_name)*arg;
     21 
     22 int mult = (unknown_type_name) * arg;
     23 
     24 /* See the option -ta for handling these types. */
     25 int suff = (unknown_type_name_t) * arg;
     26 #indent end
     27 
     28 #indent run -Tcustom_type_name -di0 -cs
     29 int cast = (custom_type_name) *arg;
     30 
     31 int mult = (unknown_type_name) * arg;
     32 
     33 /* See the option -ta for handling these types. */
     34 int suff = (unknown_type_name_t) * arg;
     35 #indent end
     36