Fixed the pod path in archive
[sdlgit/SDL_perl.git] / src / SFont.xs
index 092cf00..017987b 100644 (file)
@@ -1,10 +1,31 @@
-// SDL::SFont
 //
-// SFont bitmap font support
+// SFont.xs
 //
-// SFont library code by Karl Bartel <karlb@gmx.net>       
+// Original SFont code Copyright (C) Karl Bartel 
+// Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
 //
-// SFont.xs Copyright (C) 2004 David J. Goehrig
+// ------------------------------------------------------------------------------
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library 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
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+// ------------------------------------------------------------------------------
+//
+// Please feel free to send questions, suggestions or improvements to:
+//
+//     David J. Goehrig
+//     dgoehrig@cpan.org
 //
 
 #include "EXTERN.h"
@@ -23,8 +44,8 @@
 #define HAVE_TLS_CONTEXT
 #endif
 
-#include "../defines.h"
-#include "../SFont.h"
+#include "../../src/defines.h"
+#include "../../src/SFont.h"
 
 #ifdef HAVE_SDL_IMAGE
 #include <SDL_image.h>
@@ -204,7 +225,7 @@ void SFont_InternalInput( SDL_Surface *Dest, SFont_FontInfo *Font, int x, int y,
                if ((ch=='\b')&&(strlen(text)>0))
                    text[strlen(text)-1]='\0';
                else if (ch!='\b')
-                   sprintf(text,"%s%c",text,ch);
+                   sprintf(text+strlen(text),"%c",ch);
                if (SFont_TextWidth2(Font,text)>PixelWidth) text[strlen(text)-1]='\0';
                SDL_BlitSurface( Back, NULL, Dest, &rect);
                SFont_PutString2(Dest, Font, x, y, text);
@@ -251,6 +272,8 @@ PROTOTYPES : DISABLE
 
 #ifdef HAVE_SDL_IMAGE
 
+=for comment
+
 SDL_Surface *
 NewFont ( filename )
        char *filename
@@ -260,6 +283,8 @@ NewFont ( filename )
        OUTPUT:
                RETVAL
 
+=cut
+
 void
 UseFont ( surface )
        SDL_Surface *surface