From 22f5cbdeb797fc86775804eb2098f41cd9fdb8cd Mon Sep 17 00:00:00 2001 From: Anicka Bernathova Date: Wed, 22 Jul 2009 16:48:26 +0200 Subject: [PATCH] some fixes for manpage --- umpf.1 | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/umpf.1 b/umpf.1 index e696e6e..147fef8 100644 --- a/umpf.1 +++ b/umpf.1 @@ -4,6 +4,8 @@ umpf \- universal mail processing filter .SH SYNOPSIS .B umpf [-c config_file] [-m default_mailbox] +.SH AVAILABILITY +Linux only. .SH DESCRIPTION Umpf is a program that reads an e-mail from stdin and according to the config file decides, what to do with it. It is possible to forward the e-mail, @@ -52,12 +54,12 @@ pipe can be used to do it) refers to the output of last external program executed by action pipe .SS COMMANDS A command is either an action specification or an assignment. All the -commands must with semicolon. Commands can be grouped in blocks bounded by +commands must end with semicolon. Commands can be grouped in blocks bounded by braces. .SS ASSIGNMENTS Assignment is specified in a following way: .P -.B Lvalue = Rvalue ; +.B "Lvalue = Rvalue ;" .P Lvalue is a variable identifier. Rvalue can be variable, a constant (constant must be given in double quotes) or an expression consisting of variables, @@ -66,7 +68,7 @@ constants and binary operations , .B + , -.B - +.B \- , .B * and @@ -74,18 +76,18 @@ and , operation .B . stands for string contatenations, the rest of them are arithmetic operations. -Doing arithemtic operations makes sense only on integers. Precedence of the +Doing arithmetic operations makes sense only on integers. Precedence of the operations can be specified using parentheses. .SS ACTIONS -Actions are specified with an arrow operator. Plain +Actions are specified with an arrow operator. .TP -.B -> ; +.B "-> ;" means "deliver the e-mail to the default mailbox and exit". .TP -.B -> expression ; +.B "-> expression ;" means "deliver the e-mail the mailbox specified behind arrow and exit" .TP -.B -> pipe expression ; +.B "-> pipe expression ;" means "pipe the e-mail to the external program specified behind pipe keyword". Output of the program is stored in .B $LAST_OUTPUT @@ -93,14 +95,14 @@ variable, its exit code is stored in .B $LAST_EXIT_CODE variable. .TP -.B -> filter expression -means "pipe the e-mail to the external program and replace it with output of the program". All the headers variables, +.B "-> filter expression" +means "pipe the e-mail to the external program and replace it with output of the program". All the header variables, .B $MAIL_LEN and .B $LAST_EXIT_CODE are set accordingly. .TP -.B -> discard ; +.B "-> discard ;" means just "discard the email and exit". .TP .B -> mail expression ; @@ -111,33 +113,33 @@ If action fails, the e-mail is delivered to the default mailbox. Some of the actions (delivery or forwarding an e-mail) can have keyword copy in front of the arrow, ie. .P -.B copy -> "mailbox"; +.B "copy -> $mailbox;" .P When copy is specified, the program does not exit after doing an action but -continues reading the rules. It also does not deliver to default mailbox if +continues reading the rules. It also does not deliver to the default mailbox if action fails. .SS CONDITIONS Conditional execution of commands can be specified in a following way: .P -.B if (condition) { ... } +.B "if (condition) { ... }" .P -.B if (condtion) { ... } else { ... } +.B "if (condtion) { ... } else { ... }" .P -.B if (condition) { ... } else if { ... } [ else { ... } ] +.B "if (condition) { ... } else if { ... } [ else { ... } ]" .P where the condition can be a constant, a variable or an expression consisting of following operations: .TP -.B & +.B "&" is binary boolean and .TP -.B | +.B "|" is binary boolean or .TP -.B ^ +.B "^" is binary boolean xor .TP -.B ! +.B "!" is unary boolean not .TP -1 A variable or a constant has a boolean value 0, if its value is either "" or @@ -146,8 +148,7 @@ A variable or a constant has a boolean value 0, if its value is either "" or Expressions can be compared using following binary relations. .P String comparisons: -.P -.TP +.TP 5 .B ~~ means "matches" (left operand should be string, right one can be a perl compatible regular expression) .TP @@ -155,7 +156,7 @@ means "matches" (left operand should be string, right one can be a perl compatib means "does not match" .TP -1 Integer comparisons (does not make sense on strings): -.TP +.TP 5 .B == means "is equal to" .TP -- 2.39.5