Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-core / trunk / src / modules / mod_gif / trgt_gif.h
index 42444ba..ae10e31 100644 (file)
@@ -1,18 +1,22 @@
-/*! ========================================================================
-** Synfig
-** Template Header File
-** $Id: trgt_gif.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
+/* === S Y N F I G ========================================================= */
+/*!    \file trgt_gif.h
+**     \brief Template Header
 **
-** Copyright (c) 2002 Robert B. Quattlebaum Jr.
+**     $Id$
 **
-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+**     \legal
+**     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
 **
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+**     This package is free software; you can redistribute it and/or
+**     modify it under the terms of the GNU General Public License as
+**     published by the Free Software Foundation; either version 2 of
+**     the License, or (at your option) any later version.
+**
+**     This package 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
+**     General Public License for more details.
+**     \endlegal
 **
 ** === N O T E S ===========================================================
 **
@@ -53,7 +57,7 @@ private:
                bitstream(synfig::SmartFILE file):file(file),pool(0),curr_bit(0),curr_pos(0) {}
                unsigned char buffer[256];
                int curr_pos;
-               
+
                // Pushes a single bit onto the bit
                void push_bit(bool bit)
                {
@@ -63,8 +67,8 @@ private:
                        if(curr_bit==8)
                                empty();
                }
-               
-               // Emptys out the current pool into
+
+               // Empties out the current pool into
                // the buffer. Calls 'dump()' if the
                // buffer is full.
                void empty()
@@ -74,9 +78,9 @@ private:
                        pool=0;
                        if(curr_pos==255)dump();
                }
-               
+
                // If there is anything in the
-               // buffer or in the pool, it 
+               // buffer or in the pool, it
                // dumps it to the filestream.
                // Buffer and pool are cleared.
                void dump()
@@ -90,7 +94,7 @@ private:
                                curr_pos=0;
                        }
                }
-               
+
                // Pushes a symbol of the given size
                // onto the bitstream.
                void push_value(int value, int size)
@@ -108,24 +112,24 @@ private:
                int code; // lzwcode
                struct lzwcode* kids; // children of this node
                struct lzwcode* next; // siblings of this node
-               
+
                lzwcode():value(0),code(0),kids(0),next(0) { }
-               
+
                lzwcode *FindCode(int value)
                {
                        lzwcode *node=this;
-                       
+
                        // check the children (kids) of the node for the value
                        for (node = node->kids; node != 0; node = node->next)
                                if (node->value == value)
                                        return(node);
                        return(0);
                }
-       
+
                void AddNode(unsigned short code, unsigned short value)
                {
                        lzwcode *n = new lzwcode;
-               
+
                        // add a new child to node; the child will have code and value
                        n->value = value;
                        n->code = code;
@@ -133,21 +137,21 @@ private:
                        n->next = this->kids;
                        this->kids = n;
                }
-               
+
                static lzwcode * NewTable(int values)
                {
                        int i;
                        lzwcode * table = new lzwcode;
-               
+
                        table->kids = 0;
                        for (i = 0; i < values; i++)
                                table->AddNode( i, i);
-               
+
                        return(table);
                }
-               
+
                // Destructor just deletes any
-               // children and sibblings.
+               // children and siblings.
                ~lzwcode()
                {
                        if(kids)
@@ -161,13 +165,13 @@ private:
        bitstream bs;
        synfig::String filename;
        synfig::SmartFILE file;
-       int 
+       int
                i,                      // General-purpose index
                codesize,       // Current code size
-               rootsize,       // Size of pixel bits (will be recalculted)
+               rootsize,       // Size of pixel bits (will be recalculated)
                nextcode;       // Next code to use
        lzwcode *table,*next,*node;
-       
+
        synfig::Surface curr_surface;
        etl::surface<unsigned char> curr_frame;
        etl::surface<unsigned char> prev_frame;
@@ -184,11 +188,11 @@ private:
        int iframe_density;
        int loop_count;
        bool local_palette;
-       
+
        synfig::Palette curr_palette;
-       
+
        void output_curr_palette();
-       
+
 public:
        gif(const char *filename);
 
@@ -198,7 +202,7 @@ public:
        virtual void end_frame();
 
        virtual ~gif();
-       
+
        virtual synfig::Color * start_scanline(int scanline);
        virtual bool end_scanline(void);