Skip to content

Commit e2b9b70

Browse files
committed
Get rid of tabs
1 parent d506dd7 commit e2b9b70

23 files changed

Lines changed: 1013 additions & 1013 deletions

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ADD_DEFINITIONS(-DPROTOBUF_USE_DLLS)
121121
ADD_DEFINITIONS(-DLUA_BUILD_AS_DLL)
122122

123123
if(APPLE)
124-
add_definitions(-D_DARWIN)
124+
add_definitions(-D_DARWIN)
125125
elseif(UNIX)
126126
add_definitions(-D_LINUX)
127127
elseif(WIN32)
@@ -181,11 +181,11 @@ endif()
181181

182182
# Packaging with CPack!
183183
IF(UNIX)
184-
if(APPLE)
185-
SET(CPACK_GENERATOR "ZIP")
186-
else()
187-
SET(CPACK_GENERATOR "TGZ")
188-
endif()
184+
if(APPLE)
185+
SET(CPACK_GENERATOR "ZIP")
186+
else()
187+
SET(CPACK_GENERATOR "TGZ")
188+
endif()
189189
ELSEIF(WIN32)
190190
SET(CPACK_GENERATOR "ZIP")
191191
ENDIF()

library/CMakeLists.txt

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ IF(UNIX)
167167
IF(BUILD_EGGY)
168168
LIST(APPEND PROJECT_SOURCES ${MAIN_SOURCES_LINUX_EGGY})
169169
ELSEIF(APPLE)
170-
LIST(APPEND PROJECT_SOURCES ${MAIN_SOURCES_DARWIN})
170+
LIST(APPEND PROJECT_SOURCES ${MAIN_SOURCES_DARWIN})
171171
ELSE()
172172
LIST(APPEND PROJECT_SOURCES ${MAIN_SOURCES_LINUX})
173173
ENDIF()
@@ -235,7 +235,7 @@ ENDIF()
235235
IF(UNIX)
236236
SET(PROJECT_LIBS rt dl dfhack-md5 dfhack-tinyxml dfhack-tinythread)
237237
IF(APPLE)
238-
SET(PROJECT_LIBS dl dfhack-md5 dfhack-tinyxml dfhack-tinythread)
238+
SET(PROJECT_LIBS dl dfhack-md5 dfhack-tinyxml dfhack-tinythread)
239239
ENDIF()
240240
ELSE(WIN32)
241241
#FIXME: do we really need psapi?
@@ -273,14 +273,14 @@ ENDIF()
273273
SET_TARGET_PROPERTIES(dfhack PROPERTIES DEBUG_POSTFIX "-debug" )
274274

275275
IF(APPLE)
276-
SET(SDL_LIBRARY ${CMAKE_INSTALL_PREFIX}/libs/SDL.framework)
277-
SET(CXX_LIBRARY ${CMAKE_INSTALL_PREFIX}/libs/libstdc++.6.dylib)
278-
SET(ZIP_LIBRARY /usr/lib/libz.dylib)
279-
TARGET_LINK_LIBRARIES(dfhack ${SDL_LIBRARY})
280-
TARGET_LINK_LIBRARIES(dfhack ${CXX_LIBRARY})
281-
TARGET_LINK_LIBRARIES(dfhack ${ZIP_LIBRARY})
282-
SET_TARGET_PROPERTIES(dfhack PROPERTIES VERSION 1.0.0)
283-
SET_TARGET_PROPERTIES(dfhack PROPERTIES SOVERSION 1.0.0)
276+
SET(SDL_LIBRARY ${CMAKE_INSTALL_PREFIX}/libs/SDL.framework)
277+
SET(CXX_LIBRARY ${CMAKE_INSTALL_PREFIX}/libs/libstdc++.6.dylib)
278+
SET(ZIP_LIBRARY /usr/lib/libz.dylib)
279+
TARGET_LINK_LIBRARIES(dfhack ${SDL_LIBRARY})
280+
TARGET_LINK_LIBRARIES(dfhack ${CXX_LIBRARY})
281+
TARGET_LINK_LIBRARIES(dfhack ${ZIP_LIBRARY})
282+
SET_TARGET_PROPERTIES(dfhack PROPERTIES VERSION 1.0.0)
283+
SET_TARGET_PROPERTIES(dfhack PROPERTIES SOVERSION 1.0.0)
284284
ENDIF()
285285

286286
TARGET_LINK_LIBRARIES(dfhack protobuf-lite clsocket lua ${PROJECT_LIBS})
@@ -290,20 +290,20 @@ TARGET_LINK_LIBRARIES(dfhack-client protobuf-lite clsocket)
290290
TARGET_LINK_LIBRARIES(dfhack-run dfhack-client)
291291

292292
if(APPLE)
293-
add_custom_command(TARGET dfhack-run COMMAND ${dfhack_SOURCE_DIR}/package/darwin/fix-libs.sh WORKING_DIRECTORY ../ COMMENT "Fixing library dependencies...")
293+
add_custom_command(TARGET dfhack-run COMMAND ${dfhack_SOURCE_DIR}/package/darwin/fix-libs.sh WORKING_DIRECTORY ../ COMMENT "Fixing library dependencies...")
294294
endif()
295295

296296
IF(UNIX)
297-
if (APPLE)
298-
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/darwin/dfhack
299-
DESTINATION .)
300-
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/darwin/dfhack-run
301-
DESTINATION .)
297+
if (APPLE)
298+
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/darwin/dfhack
299+
DESTINATION .)
300+
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/darwin/dfhack-run
301+
DESTINATION .)
302302
else()
303-
# On linux, copy our version of the df launch script which sets LD_PRELOAD
304-
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack
303+
# On linux, copy our version of the df launch script which sets LD_PRELOAD
304+
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack
305305
DESTINATION .)
306-
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack-run
306+
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack-run
307307
DESTINATION .)
308308
endif()
309309
ELSE()

library/Core.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve
375375
" reload PLUGIN|all - Reload a plugin or all loaded plugins.\n"
376376
);
377377

378-
con.print("\nDFHack version " DFHACK_VERSION ".\n");
378+
con.print("\nDFHack version " DFHACK_VERSION ".\n");
379379
}
380380
else if (parts.size() == 1)
381381
{
@@ -747,13 +747,13 @@ void fIOthread(void * iodata)
747747
else if(ret)
748748
{
749749
// a proper, non-empty command was entered
750-
fprintf(stderr,"Adding command to history\n");
750+
fprintf(stderr,"Adding command to history\n");
751751
main_history.add(command);
752-
fprintf(stderr,"Saving history\n");
752+
fprintf(stderr,"Saving history\n");
753753
main_history.save("dfhack.history");
754754
}
755755

756-
fprintf(stderr,"Running command\n");
756+
fprintf(stderr,"Running command\n");
757757

758758
auto rv = core->runCommand(con, command);
759759

library/Hooks-windows.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -271,39 +271,39 @@ DFhackCExport vPtr SDL_SetVideoMode(int width, int height, int bpp, uint32_t fla
271271
static int (*_SDL_UpperBlit)(DFHack::DFSDL_Surface* src, DFHack::DFSDL_Rect* srcrect, DFHack::DFSDL_Surface* dst, DFHack::DFSDL_Rect* dstrect) = 0;
272272
DFhackCExport int SDL_UpperBlit(DFHack::DFSDL_Surface* src, DFHack::DFSDL_Rect* srcrect, DFHack::DFSDL_Surface* dst, DFHack::DFSDL_Rect* dstrect)
273273
{
274-
if ( dstrect != NULL && dstrect->h != 0 && dstrect->w != 0 )
275-
{
276-
DFHack::Core & c = DFHack::Core::getInstance();
277-
DFHack::Graphic* g = c.getGraphic();
278-
DFHack::DFTileSurface* ov = g->Call(dstrect->x/dstrect->w, dstrect->y/dstrect->h);
279-
280-
if ( ov != NULL )
281-
{
282-
if ( ov->paintOver )
283-
{
284-
_SDL_UpperBlit(src, srcrect, dst, dstrect);
285-
}
286-
287-
DFHack::DFSDL_Rect* dstrect2 = new DFHack::DFSDL_Rect;
288-
dstrect2->x = dstrect->x;
289-
dstrect2->y = dstrect->y;
290-
dstrect2->w = dstrect->w;
291-
dstrect2->h = dstrect->h;
292-
293-
if ( ov->dstResize != NULL )
294-
{
295-
DFHack::DFSDL_Rect* r = (DFHack::DFSDL_Rect*)ov->dstResize;
296-
dstrect2->x += r->x;
297-
dstrect2->y += r->y;
298-
dstrect2->w += r->w;
299-
dstrect2->h += r->h;
300-
}
301-
302-
int result = _SDL_UpperBlit(ov->surface, ov->rect, dst, dstrect2);
303-
delete dstrect2;
304-
return result;
305-
}
306-
}
274+
if ( dstrect != NULL && dstrect->h != 0 && dstrect->w != 0 )
275+
{
276+
DFHack::Core & c = DFHack::Core::getInstance();
277+
DFHack::Graphic* g = c.getGraphic();
278+
DFHack::DFTileSurface* ov = g->Call(dstrect->x/dstrect->w, dstrect->y/dstrect->h);
279+
280+
if ( ov != NULL )
281+
{
282+
if ( ov->paintOver )
283+
{
284+
_SDL_UpperBlit(src, srcrect, dst, dstrect);
285+
}
286+
287+
DFHack::DFSDL_Rect* dstrect2 = new DFHack::DFSDL_Rect;
288+
dstrect2->x = dstrect->x;
289+
dstrect2->y = dstrect->y;
290+
dstrect2->w = dstrect->w;
291+
dstrect2->h = dstrect->h;
292+
293+
if ( ov->dstResize != NULL )
294+
{
295+
DFHack::DFSDL_Rect* r = (DFHack::DFSDL_Rect*)ov->dstResize;
296+
dstrect2->x += r->x;
297+
dstrect2->y += r->y;
298+
dstrect2->w += r->w;
299+
dstrect2->h += r->h;
300+
}
301+
302+
int result = _SDL_UpperBlit(ov->surface, ov->rect, dst, dstrect2);
303+
delete dstrect2;
304+
return result;
305+
}
306+
}
307307

308308
return _SDL_UpperBlit(src, srcrect, dst, dstrect);
309309
}

library/MacPool.mm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
NSAutoreleasePool *thePool;
1010

1111
int create_pool() {
12-
fprintf(stderr,"Creating autorelease pool\n");
13-
thePool = [[NSAutoreleasePool alloc] init];
14-
return 1;
12+
fprintf(stderr,"Creating autorelease pool\n");
13+
thePool = [[NSAutoreleasePool alloc] init];
14+
return 1;
1515
}
1616

1717
int destroy_pool() {
18-
fprintf(stderr,"Draining and releasing autorelease pool\n");
19-
[thePool drain];
20-
[thePool release];
21-
return 0;
18+
fprintf(stderr,"Draining and releasing autorelease pool\n");
19+
[thePool drain];
20+
[thePool release];
21+
return 0;
2222
}

library/Process-darwin.cpp

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ using namespace DFHack;
5050
Process::Process(VersionInfoFactory * known_versions)
5151
{
5252
int target_result;
53-
53+
5454
char path[1024];
5555
char *real_path;
56-
uint32_t size = sizeof(path);
57-
if (_NSGetExecutablePath(path, &size) == 0) {
58-
real_path = realpath(path, NULL);
59-
}
56+
uint32_t size = sizeof(path);
57+
if (_NSGetExecutablePath(path, &size) == 0) {
58+
real_path = realpath(path, NULL);
59+
}
6060

6161
identified = false;
6262
my_descriptor = 0;
@@ -166,29 +166,29 @@ void Process::getMemRanges( vector<t_memrange> & ranges )
166166
(vm_region_info_t)&info, &info_count, &object);
167167
if (kr == KERN_SUCCESS) {
168168
if (info.reserved==1) {
169-
address += vmsize;
170-
continue;
169+
address += vmsize;
170+
continue;
171171
}
172172
Dl_info dlinfo;
173173
int dlcheck;
174174
dlcheck = dladdr((const void*)address, &dlinfo);
175175
if (dlcheck==0) {
176-
dlinfo.dli_fname = "";
176+
dlinfo.dli_fname = "";
177177
}
178-
178+
179179
t_memrange temp;
180-
strncpy( temp.name, dlinfo.dli_fname, 1023 );
181-
temp.name[1023] = 0;
182-
temp.start = (void *) address;
183-
temp.end = (void *) (address+vmsize);
184-
temp.read = (info.protection & VM_PROT_READ);
185-
temp.write = (info.protection & VM_PROT_WRITE);
186-
temp.execute = (info.protection & VM_PROT_EXECUTE);
187-
temp.shared = info.shared;
188-
temp.valid = true;
189-
ranges.push_back(temp);
190-
191-
fprintf(stderr,
180+
strncpy( temp.name, dlinfo.dli_fname, 1023 );
181+
temp.name[1023] = 0;
182+
temp.start = (void *) address;
183+
temp.end = (void *) (address+vmsize);
184+
temp.read = (info.protection & VM_PROT_READ);
185+
temp.write = (info.protection & VM_PROT_WRITE);
186+
temp.execute = (info.protection & VM_PROT_EXECUTE);
187+
temp.shared = info.shared;
188+
temp.valid = true;
189+
ranges.push_back(temp);
190+
191+
fprintf(stderr,
192192
"%08x-%08x %8uK %c%c%c/%c%c%c %11s %6s %10s uwir=%hu sub=%u dlname: %s\n",
193193
address, (address + vmsize), (vmsize >> 10),
194194
(info.protection & VM_PROT_READ) ? 'r' : '-',
@@ -203,7 +203,7 @@ void Process::getMemRanges( vector<t_memrange> & ranges )
203203
info.user_wired_count,
204204
info.reserved,
205205
dlinfo.dli_fname);
206-
206+
207207
address += vmsize;
208208
} else if (kr != KERN_INVALID_ADDRESS) {
209209

@@ -277,15 +277,15 @@ uint32_t Process::getTickCount()
277277

278278
string Process::getPath()
279279
{
280-
char path[1024];
280+
char path[1024];
281281
char *real_path;
282-
uint32_t size = sizeof(path);
283-
if (_NSGetExecutablePath(path, &size) == 0) {
284-
real_path = realpath(path, NULL);
285-
}
286-
std::string path_string(real_path);
287-
int last_slash = path_string.find_last_of("/");
288-
std::string directory = path_string.substr(0,last_slash);
282+
uint32_t size = sizeof(path);
283+
if (_NSGetExecutablePath(path, &size) == 0) {
284+
real_path = realpath(path, NULL);
285+
}
286+
std::string path_string(real_path);
287+
int last_slash = path_string.find_last_of("/");
288+
std::string directory = path_string.substr(0,last_slash);
289289
return directory;
290290
}
291291

library/include/Console.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,20 @@ namespace DFHack
6565
bool save (const char * filename)
6666
{
6767
std::ofstream outfile (filename);
68-
//fprintf(stderr,"Save: Initialized stream\n");
68+
//fprintf(stderr,"Save: Initialized stream\n");
6969
if(outfile.bad())
7070
return false;
71-
//fprintf(stderr,"Save: Iterating...\n");
71+
//fprintf(stderr,"Save: Iterating...\n");
7272
for(auto iter = history.begin();iter < history.end(); iter++)
7373
{
74-
//fprintf(stderr,"Save: Dumping %s\n",(*iter).c_str());
74+
//fprintf(stderr,"Save: Dumping %s\n",(*iter).c_str());
7575
outfile << *iter << std::endl;
76-
//fprintf(stderr,"Save: Flushing\n");
77-
outfile.flush();
76+
//fprintf(stderr,"Save: Flushing\n");
77+
outfile.flush();
7878
}
79-
//fprintf(stderr,"Save: Closing\n");
79+
//fprintf(stderr,"Save: Closing\n");
8080
outfile.close();
81-
//fprintf(stderr,"Save: Done\n");
81+
//fprintf(stderr,"Save: Done\n");
8282
return true;
8383
}
8484
/// add a command to the history

library/include/DataDefs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ distribution.
3535

3636
// Stop some MS stupidity
3737
#ifdef interface
38-
#undef interface
38+
#undef interface
3939
#endif
4040

4141
typedef struct lua_State lua_State;

library/include/TileTypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace DFHack
4141
struct
4242
{
4343
//Maybe should add 'up' and 'down' for Z-levels?
44-
unsigned char north,south,west,east;
44+
unsigned char north,south,west,east;
4545
};
4646

4747
inline TileDirection()

0 commit comments

Comments
 (0)