[augeas-devel] [PATCH 2 of 2] Use eol, indent, comment and empty from util.aug

Raphael Pinson raphink at gmail.com
Tue Aug 12 16:41:46 UTC 2008


# HG changeset patch
# User Raphael Pinson <raphink at gmail.com>
# Date 1218559278 -7200
# Node ID 27437ecd93b5b729b386647b815bcba790aff251
# Parent  f8fa71b1e90da61a5b9ba54ec5eeaeeda9bf806a
Use eol, indent, comment and empty from util.aug

diff -r f8fa71b1e90d -r 27437ecd93b5 lenses/pam.aug
--- a/lenses/pam.aug	Tue Aug 12 18:40:55 2008 +0200
+++ b/lenses/pam.aug	Tue Aug 12 18:41:18 2008 +0200
@@ -2,8 +2,8 @@ module Pam =
 module Pam =
   autoload xfm
 
-  let eol = del /[ \t]*\n/ "\n"
-  let indent = del /[ \t]+/ ""
+  let eol = Util.eol
+  let indent = Util.indent
 
   (* For the control syntax of [key=value ..] we could split the key value *)
   (* pairs into an array and generate a subtree control/N/KEY = VALUE      *)
@@ -16,8 +16,8 @@ module Pam =
   (* and should be parsed as one                                           *)
   let argument = /[^#\n \t]+/
 
-  let comment = [ indent? . label "comment" . del /#[ \t]*/ "# " . store /([^ \t\n].*[^ \t\n]|[^ \t\n])/ . eol ]
-  let empty   = [ del /[ \t]*#?[ \t]*\n/ "" ]
+  let comment = Util.comment
+  let empty   = Util.empty
 
 
   (* Not mentioned in the man page, but Debian uses the syntax             *)




More information about the augeas-devel mailing list