Common Lisp Package: COM.INFORMATIMAGO.COMMON-LISP.UNIX.ALIASES

This package exports a function to read sendmail aliases files. License: AGPL3 Copyright Pascal J. Bourguignon 2003 - 2012 This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>

README:

FUNCTION

Public

READ-ALIASES (&OPTIONAL (ALIAS-FILE-PATH /etc/aliases))

RETURN: A list of ( alias address...). alias is a downcased string containing the alias name. address is a cons: ( :address . address ) ;; address (downcased) ( :quote . address ) ;; address (downcased) ( :file . /file/name ) ;; /file/name ( :command . command ) ;; |command ( :include . /file/name ) ;; :include:/file/name

READ-DOT-FORWARD (FORWARD-FILE-PATH)

RETURN: A list of ( address...). address is a cons: ( :address . address ) ;; address (downcased) ( :quote . address ) ;; address (downcased) ( :file . /file/name ) ;; /file/name ( :command . command ) ;; |command ( :include . /file/name ) ;; :include:/file/name

Private

CLEAN-LINES (LINES)

DO: Clean CR/LF stuff and replace tabulations by spaces.

DB-PATH (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

DB-RECORDS (INSTANCE)

@arg[extid]{A @class{extid}} @return[sytemid]{puri:uri or nil} Returns the System ID part of this External ID.

PARSE-ADDRESS (LINE POS FOLLOW)

start ::= address | file | command | include . address ::= rfc822-address . file ::= '/' path . command ::= '|' command . include ::= ':include:' '/' path.

Undocumented

ADDRESS-STRING (ADDRESS)

ADDRESS-TYPE (ADDRESS)

ADDRESS-VALUE (ADDRESS)

ADDRESSP (OBJECT)

ALIAS-ADDRESSES (ALIAS)

SETFALIAS-ADDRESSES (ADDRESSES ALIAS)

ALIAS-NAME (ALIAS)

ALIAS-RECORD (DB NAME)

ALIASP (OBJECT)

CLEAN-DB-LINES (LINES)

COMMENT-RECORD-CONTAINING (DB SUBSTRING)

COMMENT-TEXT (COMMENT)

COMMENTP (OBJECT)

COPY-DB (INSTANCE)

DB-P (OBJECT)

SETFDB-PATH (NEW-VALUE INSTANCE)

SETFDB-RECORDS (NEW-VALUE INSTANCE)

DELETE-RECORD (DB RECORD)

ENCAPSULATE (ADDR)

FIND-RECORD-IF (DB PREDICATE)

INSERT-RECORD (DB RECORD &KEY (BEFORE NIL BEFOREP) (AFTER ALL AFTERP))

JOIN-CONTINUATION-LINES (LINES)

LIST-ALL-ALIASES (DB)

LOAD-ALIASES (&OPTIONAL (ALIAS-FILE-PATH /etc/aliases) &KEY (EXTERNAL-FORMAT DEFAULT))

MAKE-ADDRESS (TYPE VALUE)

MAKE-ALIAS (NAME ADDRESSES)

MAKE-COMMENT (TEXT)

MAKE-DB (&KEY ((PATH DUM549) NIL) ((RECORDS DUM550) NIL))

NORMAL-CHARACTER-P (CH)

NORMAL-OR-QUOTE-STRING (STRING)

NORMAL-STRING-P (STRING)

PARSE-ADDRESS-LIST (LINE POS)

PARSE-ALIAS (LINE)

PARSE-DOT-FORWARD-ALIAS (LINE)

PARSE-EOLN (LINE POS)

PARSE-TOKEN (LINE POS TOKEN)

QUOTE-STRING (STRING)

RECORDS-BETWEEN-TAGS (DB BEGIN END)

REMOVE-COMMENTS (LINES)

REMOVE-USER (DB NAME)

SAVE-ALIASES (DB &KEY (STREAM *STANDARD-OUTPUT* STREAMP) (FILE-PATH (DB-PATH DB) FILE-PATH-P) (IF-EXISTS ERROR) (IF-DOES-NOT-EXIST CREATE) (EXTERNAL-FORMAT DEFAULT))

SKIP-SPACES (LINE POS)

MACRO

Private

Undocumented

WITH-ALIAS-FILE ((VARNAME PATHNAME &KEY (EXTERNAL-FORMAT DEFAULT)) &BODY BODY)

VARIABLE

Private

+CR+

A string containing a carriage return.

+CRLF+

A string containing a carriage return and a line feed.

+SPHT+

A string containing space and tabulation.

+SPHTCRLF+

A string containing space, tabulation, carriage return and line feed.

Undocumented

*ADDRESS-TYPES*

*MAX-COLUMN*

*NORMAL-CHARACTERS*

+HT+

CLASS

Private

Undocumented

DB