pike.git / src / modules / Gz / module.pmod.in

version» Context lines:

pike.git/src/modules/Gz/module.pmod.in:1: - // $Id: module.pmod.in,v 1.4 2002/11/25 01:54:00 nilsson Exp $ + // $Id: module.pmod.in,v 1.5 2002/11/25 11:18:14 grubba Exp $   #pike __REAL_VERSION__      inherit @module@;         //! Allows the user to open a Gzip archive and read and write   //! it's contents in an uncompressed form, emulating the @[Stdio.File]   //! interface.   //! @note   //! An important limitation on this class is that it may only be used
pike.git/src/modules/Gz/module.pmod.in:18:       private int is_open = 0;       //! @decl void create(void|string|int file, void|string mode)    //! @param file    //! Filename or filedescriptor of the gzip file to open.    //! @param mode    //! mode for the file. Defaults to "rb".    //! @seealso    //! @[open] @[Stdio.File] -  void create(mixed ... args) { +  static void create(mixed ... args) {    ::create();       if(sizeof(args)) {    open(@args);    }    }    -  string _sprintf(int t) +  static string _sprintf(int t)    {    switch(t) {    case 'O':    return sprintf("Gz.File(/*%s open */)", is_open ? "" : " not");    case 't':    return "Gz.File";    default: -  return ""; +  return UNDEFINED;    }    }       int close()    {    is_open = 0;    return ::close();    }    -  void destroy() { +  static void destroy() {    close();    }       //! @param file    //! Filename or filedescriptor of the gzip file to open.    //! @param mode    //! mode for the file. Defaults to "rb".    //! May be one of the following:    //! @dl    //! @item rb