START perms
    SOURCE file of functions
    SOURCE file of configuration info

    SET dir to arg 1 if present
    SET dir to . if no dir

    PUT config file values

    FOR each file in the directory
        CALL my-format with the current file name
    END FOR

    EXIT 0
END perms

START my-format USING $1
    COMMAND for directory/file
    EXTRACT permissions
    PUT directory/file and permissions
    RETURN 0
END my-format
