RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: lua/local/ llocal.lua

From: Ralf S. Engelschall <rse@rpm5.org>
Date: Mon 31 Dec 2007 - 21:28:29 CET
Message-Id: <20071231202829.564CB348460@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Ralf S. Engelschall
  Root:   /v/rpm/cvs                       Email:  rse@rpm5.org
  Module: lua                              Date:   31-Dec-2007 21:28:29
  Branch: HEAD                             Handle: 2007123120282900

  Modified files:
    lua/local               llocal.lua

  Log:
    remove trailing whitespaces

  Summary:
    Revision    Changes     Path
    1.8         +17 -17     lua/local/llocal.lua
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: lua/local/llocal.lua
  ============================================================================
  $ cvs diff -u -r1.7 -r1.8 llocal.lua
  --- lua/local/llocal.lua	31 Dec 2007 20:26:41 -0000	1.7
  +++ lua/local/llocal.lua	31 Dec 2007 20:28:29 -0000	1.8
  @@ -3,7 +3,7 @@
   --                               GLOBAL HACKS
   --  -----------------------------------------------------------------------  --
   
  ---  provide a generic regular expression constructor 
  +--  provide a generic regular expression constructor
   --  based on the most powerful regular expression engine
   rex.new = rex.newPCRE
   if rex.new == nil then
  @@ -173,20 +173,20 @@
       io.stderr:write(util.dump(obj1, unpack(arg)))
   end
   
  ---  -----------------------------------------------------------------------  --                                                                
  ---                          I/O UTILITIES                                                                                                      
  ---  -----------------------------------------------------------------------  --                                                                
  -                                                                                                                                               
  ---  slurp in all data of a file                                                                                                                
  -function util.slurp(filename)                                                                                                                  
  -    local data = nil                                                                                                                           
  -    if filename ~= nil then                                                                                                                    
  -        local fp, error = io.open(filename, "r")                                                                                               
  -        if fp ~= nil then                                                                                                                      
  -            data = fp:read("*all")                                                                                                             
  -            io.close(fp)                                                                                                                       
  -        end                                                                                                                                    
  -    end                                                                                                                                        
  -    return data                                                                                                                                
  -end                                                                                                                                            
  +--  -----------------------------------------------------------------------  --
  +--                          I/O UTILITIES
  +--  -----------------------------------------------------------------------  --
  +
  +--  slurp in all data of a file
  +function util.slurp(filename)
  +    local data = nil
  +    if filename ~= nil then
  +        local fp, error = io.open(filename, "r")
  +        if fp ~= nil then
  +            data = fp:read("*all")
  +            io.close(fp)
  +        end
  +    end
  +    return data
  +end
   
  @@ .
Received on Mon Dec 31 21:28:29 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.