summaryrefslogtreecommitdiff
path: root/form.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-05-25 13:46:01 +0100
committerDavid Mitchell <davem@iabyn.com>2011-05-29 20:21:52 +0100
commit086b26f34368613caec44287505d3c6f0a6336a7 (patch)
treec2ad9b3795112586949c114a2c44744a07625d55 /form.h
parent3808a68376b13a13745f22f7454ecf5e673ad24f (diff)
downloadperl-086b26f34368613caec44287505d3c6f0a6336a7.tar.gz
better document format code
add descriptions of: format op constants local vars code blocks to generally make navigating the format code easier. (Oh, and fix one incorrect indent). No code changes.
Diffstat (limited to 'form.h')
-rw-r--r--form.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/form.h b/form.h
index 114d6d4475..7ddeb715ed 100644
--- a/form.h
+++ b/form.h
@@ -1,27 +1,27 @@
/* form.h
*
- * Copyright (C) 1991, 1992, 1993, 2000, 2004 by Larry Wall and others
+ * Copyright (C) 1991, 1992, 1993, 2000, 2004, 2011 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
*
*/
-#define FF_END 0
-#define FF_LINEMARK 1
-#define FF_LITERAL 2
-#define FF_SKIP 3
-#define FF_FETCH 4
-#define FF_CHECKNL 5
-#define FF_CHECKCHOP 6
-#define FF_SPACE 7
-#define FF_HALFSPACE 8
-#define FF_ITEM 9
-#define FF_CHOP 10
-#define FF_LINEGLOB 11
-#define FF_DECIMAL 12
-#define FF_NEWLINE 13
-#define FF_BLANK 14
-#define FF_MORE 15
-#define FF_0DECIMAL 16
-#define FF_LINESNGL 17
+#define FF_END 0 /* tidy up, then return */
+#define FF_LINEMARK 1 /* start (or end) of a line */
+#define FF_LITERAL 2 /* append <arg> literal chars */
+#define FF_SKIP 3 /* skip <arg> chars in format */
+#define FF_FETCH 4 /* get next item and set field size to <arg> */
+#define FF_CHECKNL 5 /* find max len of item (up to \n) that fits field */
+#define FF_CHECKCHOP 6 /* like CHECKNL, but up to highest split point */
+#define FF_SPACE 7 /* append padding space (diff of field, item size) */
+#define FF_HALFSPACE 8 /* like FF_SPACE, but only append half as many */
+#define FF_ITEM 9 /* append a text item, while blanking ctrl chars */
+#define FF_CHOP 10 /* (for ^*) chop the current item */
+#define FF_LINEGLOB 11 /* process @* */
+#define FF_DECIMAL 12 /* do @##, ^##, where <arg>=(precision|flags) */
+#define FF_NEWLINE 13 /* delete trailing spaces, then append \n */
+#define FF_BLANK 14 /* for arg==0: do '~'; for arg>0 : do '~~' */
+#define FF_MORE 15 /* replace long end of string with '...' */
+#define FF_0DECIMAL 16 /* like FF_DECIMAL but for 0### */
+#define FF_LINESNGL 17 /* process ^* */