]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/bobtoolz/lists.cpp
Revert partially (auto) "reformat code! now the code is only ugly on the *inside*"
[xonotic/netradiant.git] / contrib / bobtoolz / lists.cpp
index 9830c3764134fee7ae7b86d4d0e5ad4a4a2640f8..74e31bc89a2a00f07d2fcc206f1076ff8f92220b 100644 (file)
 
 #include "misc.h"
 
-bool LoadExclusionList(char *filename, std::list<Str> *exclusionList)
-{
-    FILE *eFile = fopen(filename, "r");
-    if (eFile) {
-        char buffer[256];
-        int cnt = 0;
-        while (!feof(eFile)) {
-            memset(buffer, 0, 256);
-            fscanf(eFile, "%s\n", buffer);
-
-            if (strlen(buffer) > 0) {
-                exclusionList->push_back(buffer);
-            } else {
-                cnt++;
-            }
-        }
-
-        fclose(eFile);
-
-        return TRUE;
-    }
-
-    globalErrorStream() << "Failed To Load Exclusion List: " << filename << "\n";
-    return FALSE;
+bool LoadExclusionList( char* filename, std::list<Str>* exclusionList ){
+       FILE* eFile = fopen( filename, "r" );
+       if ( eFile ) {
+               char buffer[256];
+               int cnt = 0;
+               while ( !feof( eFile ) )
+               {
+                       memset( buffer, 0, 256 );
+                       fscanf( eFile, "%s\n", buffer );
+
+                       if ( strlen( buffer ) > 0 ) {
+                               exclusionList->push_back( buffer );
+                       }
+                       else{
+                               cnt++;
+                       }
+               }
+
+               fclose( eFile );
+
+               return TRUE;
+       }
+
+       globalErrorStream() << "Failed To Load Exclusion List: " << filename << "\n";
+       return FALSE;
 }
 
-bool LoadGList(char *filename, ui::ListStore loadlist)
-{
-    FILE *eFile = fopen(filename, "r");
-    if (eFile) {
-        char buffer[256];
-        int cnt = 0;
-        while (!feof(eFile)) {
-            memset(buffer, 0, 256);
-            fscanf(eFile, "%s\n", buffer);
-
-            if (strlen(buffer) > 0) {
-                char *buffer2 = new char[strlen(buffer) + 1];
-                strcpy(buffer2, buffer);
-                loadlist.append(0, buffer2);
-            } else {
-                cnt++;
-            }
-        }
-
-        fclose(eFile);
-
-        return TRUE;
-    }
-
-    globalErrorStream() << "Failed To Load GList: " << filename << "\n";
-    return FALSE;
+bool LoadGList( char* filename, ui::ListStore loadlist ){
+       FILE* eFile = fopen( filename, "r" );
+       if ( eFile ) {
+               char buffer[256];
+               int cnt = 0;
+               while ( !feof( eFile ) )
+               {
+                       memset( buffer, 0, 256 );
+                       fscanf( eFile, "%s\n", buffer );
+
+                       if ( strlen( buffer ) > 0 ) {
+                               char* buffer2 = new char[strlen( buffer ) + 1];
+                               strcpy( buffer2, buffer );
+                               loadlist.append(0, buffer2);
+                       }
+                       else{
+                               cnt++;
+                       }
+               }
+
+               fclose( eFile );
+
+               return TRUE;
+       }
+
+       globalErrorStream() << "Failed To Load GList: " << filename << "\n";
+       return FALSE;
 }