Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > 44409468afbe3edfb6003b2e8bfcf285 > files > 1

kiki-1.0.2-6mdv2008.1.src.rpm

--- kiki/kodilib/src/tools/KStringTools.cpp.64bit-fixes	2003-04-13 23:42:13.000000000 +0200
+++ kiki/kodilib/src/tools/KStringTools.cpp	2007-04-11 18:11:45.000000000 +0200
@@ -13,7 +13,7 @@
 void kStringInsertStringBehindTags ( std::string & str, const std::string & insertString, 
                                      const std::string & tag )
 {
-    unsigned int oldPos = 0;
+    std::string::size_type oldPos = 0;
     while ((oldPos = str.find(tag, oldPos)) != std::string::npos)
     {
         oldPos += tag.size();
@@ -34,8 +34,8 @@ std::vector<std::string> kStringGetCompo
 {
     std::vector<std::string> components;
     
-    unsigned int dividerLength = divider.size();
-    unsigned int oldpos = 0, pos;
+    std::string::size_type dividerLength = divider.size();
+    std::string::size_type oldpos = 0, pos;
     
     while ((pos = str.find(divider, oldpos)) != std::string::npos)
     {
@@ -50,7 +50,7 @@ std::vector<std::string> kStringGetCompo
 // --------------------------------------------------------------------------------------------------------
 void kStringReplace ( std::string & str, const std::string & toReplace, const std::string & replacement )
 {
-    unsigned int pos = 0, chars = toReplace.size();
+    std::string::size_type pos = 0, chars = toReplace.size();
     while ((pos = str.find(toReplace, pos)) != std::string::npos)
     {
         str.replace(pos, chars, replacement);
@@ -60,11 +60,11 @@ void kStringReplace ( std::string & str,
 // --------------------------------------------------------------------------------------------------------
 void kStringReplaceTabs ( std::string & str, unsigned int tabWidth )
 {
-    unsigned int tabPos;
+    std::string::size_type tabPos;
     while ((tabPos = str.find('\t')) != std::string::npos)
     {
-        unsigned int lastNewlinePos = str.rfind('\n', tabPos-1);
-        unsigned int relPos = (lastNewlinePos == std::string::npos) ? tabPos : tabPos - lastNewlinePos; 
+        std::string::size_type lastNewlinePos = str.rfind('\n', tabPos-1);
+        std::string::size_type relPos = (lastNewlinePos == std::string::npos) ? tabPos : tabPos - lastNewlinePos; 
         str.replace(tabPos, 1, std::string(tabWidth-(relPos % tabWidth), ' '));
     }
 }
@@ -114,7 +114,7 @@ unsigned int kStringCountChars ( const s
 // --------------------------------------------------------------------------------------------------------
 unsigned int kStringNthCharPos ( const std::string & str, unsigned int n, char c )
 {
-    unsigned int loc = n, oloc = 0;
+    std::string::size_type loc = n, oloc = 0;
     while (n > 0 && (loc = str.find(c, oloc)) != std::string::npos)
     { 
         n--; 
@@ -138,7 +138,7 @@ void kStringCropRows ( std::string & str
 // --------------------------------------------------------------------------------------------------------
 void kStringCropCols ( std::string & str, unsigned int columns )
 {        
-    unsigned int oloc = 0, nloc = 0;
+    std::string::size_type oloc = 0, nloc = 0;
     while ((nloc = str.find('\n', oloc)) != std::string::npos)
     {
         if ((nloc - oloc) > columns)
@@ -160,10 +160,10 @@ void kStringCropCols ( std::string & str
 unsigned int kStringCols ( const std::string & str )
 {
     if (str.size() == 0) return 0;
-    int oloc = 0, nloc;
+    long oloc = 0, nloc;
     std::string substring;
     int maxlength = 0, length;
-    while ((nloc = str.find('\n', oloc)) != (int)std::string::npos) 
+    while ((nloc = str.find('\n', oloc)) != (long)std::string::npos) 
     {
         substring = str.substr(oloc, nloc - oloc);
         length = substring.size();
@@ -181,7 +181,7 @@ unsigned int kStringCols ( const std::st
 unsigned int kStringRows ( const std::string & str )
 {
     if (str.size() == 0) return 1;
-    unsigned int loc = 0, lines = 0;
+    std::string::size_type loc = 0, lines = 0;
     while ((loc = str.find('\n', loc)) != std::string::npos) { lines++; loc++; }
     if (str[str.size()-1] == '\n') return lines;
     return lines+1;
@@ -204,8 +204,8 @@ std::string kStringPrintf ( const std::s
 {
     static char str[256];
     std::string format(fmt), subformat, text;
-    unsigned int oloc = 0;
-    unsigned int nloc = 0;
+    std::string::size_type oloc = 0;
+    std::string::size_type nloc = 0;
     
     kStringReplaceTabs(format);
     
@@ -260,7 +260,7 @@ std::string kStringPrintf ( const char *
 // --------------------------------------------------------------------------------------------------------
 bool kStringHasSuffix ( const std::string & str, const std::string & suffix )
 {
-    unsigned int result = str.rfind(suffix);
+    std::string::size_type result = str.rfind(suffix);
     if (result == std::string::npos) return false;
     return (result == str.size()-suffix.size());
 }
--- kiki/kodilib/src/tools/KFileTools.cpp.64bit-fixes	2004-06-30 18:03:38.000000000 +0200
+++ kiki/kodilib/src/tools/KFileTools.cpp	2007-04-11 18:17:10.000000000 +0200
@@ -214,8 +214,8 @@ string kFileAbsPathName ( const string &
 // --------------------------------------------------------------------------------------------------------
 string kFileSuffix ( const string & path )
 {
-    unsigned int lastDotPos = path.rfind(".");
-    unsigned int lastSlashPos = path.rfind(kPathSep);
+    std::string::size_type lastDotPos = path.rfind(".");
+    std::string::size_type lastSlashPos = path.rfind(kPathSep);
 
     if (lastDotPos < path.size() - 1 && (lastDotPos > lastSlashPos || lastSlashPos == string::npos))
     {
--- kiki/kodilib/src/tools/KKeyTools.cpp.64bit-fixes	2003-04-09 04:56:03.000000000 +0200
+++ kiki/kodilib/src/tools/KKeyTools.cpp	2007-04-11 18:18:02.000000000 +0200
@@ -170,7 +170,7 @@ int kKeyGetDisplayWidthForModifier ( con
 // --------------------------------------------------------------------------------------------------------
 int kKeyGetDisplayWidthForKey ( const std::string & keyName )
 {
-    unsigned int keyPos = keyName.find('_', 0);
+    std::string::size_type keyPos = keyName.find('_', 0);
     if (keyPos == std::string::npos) 
     {
         return kKeyGetDisplayWidthForPureKey(keyName) + KDL_MOD_KEY_SPACING;
@@ -313,7 +313,7 @@ int kKeyDisplayPureKey ( const std::stri
 int kKeyDisplayKey ( const std::string & keyName, const KPosition & pos )
 {
     KPosition start = pos;
-    unsigned int keyPos = keyName.find('_', 0);
+    std::string::size_type keyPos = keyName.find('_', 0);
     if (keyPos == std::string::npos) 
     {
         return start.x + kKeyDisplayPureKey(keyName, start) + KDL_MOD_KEY_SPACING;
@@ -380,7 +380,7 @@ SDLMod kKeyGetModForModName ( const std:
 // --------------------------------------------------------------------------------------------------------
 SDL_keysym kKeyGetKeysymForKeyName ( const std::string & keyName )
 {
-    unsigned int pos = keyName.find('_');
+    std::string::size_type pos = keyName.find('_');
     
     std::string modString;
     std::string symString = keyName;
--- kiki/kodilib/src/tools/KXMLTools.cpp.64bit-fixes	2003-04-13 23:42:13.000000000 +0200
+++ kiki/kodilib/src/tools/KXMLTools.cpp	2007-04-11 18:19:27.000000000 +0200
@@ -58,11 +58,11 @@ std::string kXMLPrintf ( int depth, cons
 std::string kXMLParseToTagsInVector ( std::string & xml, const std::vector<std::string> & tags )
 {
     std::string open("<");
-    unsigned int minLoc = std::string::npos; 
+    std::string::size_type minLoc = std::string::npos; 
     std::vector<std::string>::const_iterator iter = tags.begin();
     while (iter != tags.end())
     {
-        unsigned int loc = xml.find(open+(*iter));
+        std::string::size_type loc = xml.find(open+(*iter));
         if (loc < minLoc) minLoc = loc;
         iter++;
     }
@@ -77,7 +77,7 @@ std::string kXMLReadNamedAttribute ( con
     std::string value;
     std::string nameStr(name);
     nameStr += "='";
-    unsigned int loc = xml.find(nameStr);
+    std::string::size_type loc = xml.find(nameStr);
     if (loc != std::string::npos)
     {	
         loc += nameStr.size();
@@ -90,7 +90,7 @@ std::string kXMLReadNamedAttribute ( con
 // --------------------------------------------------------------------------------------------------------
 bool kXMLParseNamedCloseTag ( std::string & xml, const std::string & name, bool printError )
 {
-    unsigned int loc = xml.find('<');
+    std::string::size_type loc = xml.find('<');
     if (loc == std::string::npos) 
     {
         if (printError) KConsole::printError(kStringPrintf("invalid XML:\nmissing close tag '%s'", 
@@ -117,7 +117,7 @@ bool kXMLParseNamedCloseTag ( std::strin
 // --------------------------------------------------------------------------------------------------------
 bool kXMLReadNamedOpenTag ( const std::string & xml, const std::string & name, std::string * attributes )
 {
-    unsigned int loc = xml.find('<'), endloc;
+    std::string::size_type loc = xml.find('<'), endloc;
     
     if (loc == std::string::npos || xml[loc+1] == '/') return false;
     
@@ -140,7 +140,7 @@ bool kXMLReadNamedOpenTag ( const std::s
 // --------------------------------------------------------------------------------------------------------
 std::string kXMLParseNamedOpenTag ( std::string & xml, const std::string & name, std::string * attributes, bool printError )
 {
-    unsigned int loc = xml.find('<');
+    std::string::size_type loc = xml.find('<');
     if (loc == std::string::npos || xml[loc+1] == '/') 
     {
         if (printError) KConsole::printError(kStringPrintf("invalid XML:\nmissing tag '%s'", name.c_str()));
@@ -191,7 +191,7 @@ std::string kXMLParseNamedOpenTag ( std:
 // --------------------------------------------------------------------------------------------------------
 bool kXMLParseOpenTag ( std::string & xml, std::string & name, std::string * attributes, bool printError )
 {
-    unsigned int loc = xml.find('<');
+    std::string::size_type loc = xml.find('<');
     if (loc == std::string::npos || xml[loc+1] == '/') 
     {
         if (printError) KConsole::printError("invalid XML:\nmissing open tag");
@@ -295,7 +295,7 @@ std::string kXMLValue( const std::string
 // --------------------------------------------------------------------------------------------------------
 bool kXMLParseValue( std::string & xml, const std::string & name, int type, void * value, bool printError )
 {
-    unsigned int loc = xml.find('<');
+    std::string::size_type loc = xml.find('<');
     if (loc == std::string::npos || xml[loc+1] == '/')     
     {
         if (printError) KConsole::printError(kStringPrintf("invalid XML:\nmissing value '%s'", name.c_str()));
@@ -379,8 +379,8 @@ bool kXMLParseValue( std::string & xml, 
         }
         else if (typeString == "string")
         {
-            unsigned int first = substring.find("\"")+1;
-            unsigned int last  = substring.rfind("\"", std::string::npos);
+            std::string::size_type first = substring.find("\"")+1;
+            std::string::size_type last  = substring.rfind("\"", std::string::npos);
             *((std::string*)value) = substring.substr(first, last-first);
         }
         
--- kiki/kodilib/src/types/KKey.cpp.64bit-fixes	2003-04-09 04:56:05.000000000 +0200
+++ kiki/kodilib/src/types/KKey.cpp	2007-04-11 18:16:38.000000000 +0200
@@ -31,7 +31,7 @@ KKey::KKey ( std::string keyName )
 // --------------------------------------------------------------------------------------------------------
 std::string KKey::getUnmodifiedName () const
 {
-    unsigned int keyPos = name.find('_', 0);
+    std::string::size_type keyPos = name.find('_', 0);
     if (keyPos == std::string::npos) 
     {
         return name;
@@ -42,7 +42,7 @@ std::string KKey::getUnmodifiedName () c
 // --------------------------------------------------------------------------------------------------------
 std::string KKey::getModifierName () const
 {
-    unsigned int keyPos = name.find('_', 0);
+    std::string::size_type keyPos = name.find('_', 0);
     if (keyPos == std::string::npos) 
     {
         return "";
--- kiki/kodilib/src/widgets/KFileNameField.cpp.64bit-fixes	2003-04-13 23:53:22.000000000 +0200
+++ kiki/kodilib/src/widgets/KFileNameField.cpp	2007-04-11 18:19:57.000000000 +0200
@@ -41,7 +41,7 @@ bool KFileNameField::handleKey ( const K
         std::string restPath; 				 // path behind cursor
         
         // map cropped path to current directory and rest path to file prefix
-        unsigned int lastSlashPos = croppedPath.rfind("/");
+        std::string::size_type lastSlashPos = croppedPath.rfind("/");
         if (lastSlashPos < croppedPath.size()-1)
         {
             restPath = croppedPath.substr(lastSlashPos+1);
--- kiki/src/gui/KikiMenu.cpp.64bit-fixes	2005-10-23 15:02:17.000000000 +0200
+++ kiki/src/gui/KikiMenu.cpp	2007-04-11 18:15:37.000000000 +0200
@@ -54,7 +54,7 @@ KikiMenuItem * KikiMenu::newItem ( const
 {
     std::string item_text (itemText);
     std::string event_name (itemText);
-    unsigned int pos;
+    std::string::size_type pos;
     float scale_factor = 1.0;
 
     KikiMenuItem * menu_item = new KikiMenuItem ();
--- kiki/src/gui/KikiTextLine.cpp.64bit-fixes	2005-10-02 16:07:54.000000000 +0200
+++ kiki/src/gui/KikiTextLine.cpp	2007-04-11 18:16:05.000000000 +0200
@@ -46,7 +46,7 @@ void KikiTextLine::addCharacter ( char c
 void KikiTextLine::setText ( const std::string & str )
 {
     text = str;
-    unsigned int pos;
+    std::string::size_type pos;
  
     if ((pos = text.find ("$scale(")) != std::string::npos)
     {