"Fossies" - the Fresh Open Source Software Archive

Member "audacious-plugins-3.10.1/src/modplug/archive/archive.cc" (26 Dec 2018, 1676 Bytes) of package /linux/misc/audacious-plugins-3.10.1.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "archive.cc" see the Fossies "Dox" file reference documentation.

    1 /* Modplug XMMS Plugin
    2  * Authors: Kenton Varda <temporal@gauge3d.org>
    3  *
    4  * This source code is public domain.
    5  */
    6 
    7 #include "archive.h"
    8 
    9 using namespace std;
   10 
   11 ///* Open a read pipe */ File f;
   12 //f=popen("gzip -d compressed.file.name","r");
   13 ///* Read some data in the usual manner, for example */
   14 //fscanf(f,"%d %f %f",name,&age,$id);
   15 ///* Close the pipe */
   16 //pclose(f);
   17 
   18 Archive::~Archive()
   19 {
   20 }
   21 
   22 bool Archive::IsOurFile(const string& aFileName)
   23 {
   24     string lExt;
   25     uint32_t lPos;
   26 
   27     lPos = aFileName.find_last_of('.');
   28     if((int)lPos == -1)
   29         return false;
   30     lExt = aFileName.substr(lPos);
   31     for(uint32_t i = 0; i < lExt.length(); i++)
   32         lExt[i] = tolower(lExt[i]);
   33 
   34     if (lExt == ".669")
   35         return true;
   36     if (lExt == ".amf")
   37         return true;
   38     if (lExt == ".ams")
   39         return true;
   40     if (lExt == ".dbm")
   41         return true;
   42     if (lExt == ".dbf")
   43         return true;
   44     if (lExt == ".dsm")
   45         return true;
   46     if (lExt == ".far")
   47         return true;
   48     if (lExt == ".it")
   49         return true;
   50     if (lExt == ".mdl")
   51         return true;
   52     if (lExt == ".med")
   53         return true;
   54     if (lExt == ".mod")
   55         return true;
   56     if (lExt == ".mtm")
   57         return true;
   58     if (lExt == ".okt")
   59         return true;
   60     if (lExt == ".ptm")
   61         return true;
   62     if (lExt == ".s3m")
   63         return true;
   64     if (lExt == ".stm")
   65         return true;
   66     if (lExt == ".ult")
   67         return true;
   68     if (lExt == ".umx")      //Unreal rocks!
   69         return true;
   70     if (lExt == ".xm")
   71         return true;
   72     if (lExt == ".mt2")
   73         return true;
   74     if (lExt == ".psm")
   75         return true;
   76 
   77     return false;
   78 }