#include <stdio.h>
#include <ctype.h>
#include <cstdlib>
#include <stdlib.h>
#include <string>
#include <list>
#include "global.h"
#include <sys/stat.h>
#include "basestrm.h"
#include <SDL_endian.h>
#include "messaginghub.h"
#include "oldlzw.cpp"
Include dependency graph for basestrm.cpp:

Go to the source code of this file.
Classes | |
| struct | trleheader |
Defines | |
| #define | bzip_xor_byte 'M' |
Functions | |
| float | SwapFloat (float f) |
| static int | stream_seek (struct SDL_RWops *context, int offset, int whence) |
| static int | stream_read (SDL_RWops *context, void *ptr, int size, int maxnum) |
| static int | stream_close (SDL_RWops *context) |
| SDL_RWops * | SDL_RWFromStream (pnstream stream) |
| char * | constructFileName (char *buf, int directoryLevel, const char *path, const char *filename) |
| bool | isPathRelative (const ASCString &path) |
| ASCString | constructFileName (int directoryLevel, const ASCString &path, ASCString filename) |
| void | locateFile (const ASCString &filename, FileLocation *loc) |
| ASCString | listContainer () |
| int | compressrle (const void *p, void *q) |
| bool | patimat (const char *pat, const char *str, bool forceCaseInsensitivity) |
| bool | patimat (const ASCString &pat, const ASCString &str, bool forceCaseInsensitivity) |
| checks whether the regular expression pat matches the string str . | |
| int | checkforvaliddirectory (char *dir) |
| ASCString | getnextfilenumname (const ASCString &first, const ASCString &suffix, int num) |
| bool | exist (const ASCString &s) |
| does a file s exist (wildcards allowed) | |
| void | opencontainer (const char *wildcard) |
| time_t | get_filetime (const char *fileName) |
| int | filesize (const char *name) |
| bool | directoryExist (const ASCString &path) |
| void | addSearchPath (const ASCString &path) |
| int | getSearchPathNum () |
| ASCString | getSearchPath (int i) |
| char * | extractPath (char *buf, const char *filename) |
| char * | extractFileName (char *buf, const char *filename) |
| ASCString | extractFileName (const ASCString &filename) |
| ASCString | extractFileName_withoutSuffix (const ASCString &filename) |
| void | appendbackslash (char *string) |
| void | appendbackslash (ASCString &string) |
| int | createDirectory (const char *name) |
| void | convertPathDelimitters (ASCString &path) |
| converts path delimitters from foreign operating systems to the ones used by the current operating system. On Linux, this function converts backslashes to slashes, on Windows vice versa | |
Variables | |
| const int | maxSearchDirNum = 30 |
| int | searchDirNum = 0 |
| char * | ascDirectory [maxSearchDirNum] |
| const char * | containermagic = "NCBM" |
| const char * | LZ_SIGNATURE = "MBLZW16" |
| const char * | RLE_SIGNATURE = "MBRLE1" |
| const char * | BZIP_SIGNATURE = "MBZLB2X!" |
| ContainerCollector | containercollector |
Definition in file basestrm.cpp.
|
|
Definition at line 82 of file basestrm.cpp. Referenced by libbzip_compression::close_compression(), libbzip_decompression::readdata(), and libbzip_compression::writedata(). |
|
|
Definition at line 2299 of file basestrm.cpp. References ascDirectory, constructFileName(), directoryExist(), searchDirNum, and strdup(). Referenced by initFileIO(), main(), and opencontainer(). |
|
|
Definition at line 2384 of file basestrm.cpp. References pathdelimitter, and pathdelimitterstring. |
|
|
Definition at line 2378 of file basestrm.cpp. Referenced by checkbi3dir(), constructFileName(), getbipath(), ConfigurationFileLocatorCore::getDefaultDirectory(), ConfigurationFileLocatorCore::getSpecialPath(), and initFileIO(). |
|
|
Definition at line 2036 of file basestrm.cpp. References ASC_direct, closedir(), opendir(), and readdir(). |
|
||||||||||||
|
Definition at line 1683 of file basestrm.cpp. References trleheader::id, min(), trleheader::rle, trleheader::size, trleheader::x, and trleheader::y. Referenced by tnstream::writeImage(). |
|
||||||||||||||||
|
Definition at line 946 of file basestrm.cpp. References appendbackslash(), ascDirectory, isPathRelative(), and pathdelimitter. |
|
||||||||||||||||||||
|
|
converts path delimitters from foreign operating systems to the ones used by the current operating system. On Linux, this function converts backslashes to slashes, on Windows vice versa
Definition at line 2428 of file basestrm.cpp. References foreignPathDelimitterString, and pathdelimitterstring. Referenced by tfindfile::tfindfile(). |
|
|
Definition at line 2391 of file basestrm.cpp. References strdup(). Referenced by makeDirectory(). |
|
|
Definition at line 2282 of file basestrm.cpp. References closedir(), opendir(), and readdir(). Referenced by addSearchPath(), getDirectory(), and makeDirectory(). |
|
|
does a file s exist (wildcards allowed)
Definition at line 2226 of file basestrm.cpp. References tfindfile::getnextname(). Referenced by tdlgengine::addkey(), tdlgengine::addmarkedkey(), StartMultiplayerGame::Apply(), CargoGuiFunctions::TransferUnitControl::available(), GameMap::beginTurn(), CargoDialog::CargoDialog(), checkbi3dir(), checkDataVersion(), checkFileLoadability(), checkFileVersion(), GameMap::endRound(), FileCache::FileCache(), getbipath(), ConfigurationFileLocatorCore::getConfigFileName(), loadWave(), MailOptionsDialog::MailOptionsDialog(), mapeditorMainThread(), readgameoptions(), and UnitInfoDialog::UnitInfoDialog(). |
|
|
Definition at line 2361 of file basestrm.cpp. References extractFileName(). |
|
||||||||||||
|
Definition at line 2346 of file basestrm.cpp. Referenced by extractFileName(), extractFileName_withoutSuffix(), and ContainerCollector::init(). |
|
|
Definition at line 2367 of file basestrm.cpp. References extractFileName(). Referenced by Vehicletype::runTextIO(), TerrainType::Weather::runTextIO(), ObjectType::runTextIO(), BuildingType::runTextIO(), ASCImageArrayProperty::toString(), and ASCImageProperty::toString(). |
|
||||||||||||
|
Definition at line 2330 of file basestrm.cpp. References pathdelimitter. Referenced by ContainerCollector::init(), and writegameoptions(). |
|
|
Definition at line 2271 of file basestrm.cpp. |
|
|
Definition at line 2250 of file basestrm.cpp. References constructFileName(), FileLocation::container, FileLocation::directoryLevel, FileLocation::found, tn_file_buf_stream::get_time(), locateFile(), and maxFileStringSize. Referenced by process_ASC_map(), and process_BI_map(). |
|
||||||||||||||||
|
Definition at line 2200 of file basestrm.cpp. References tfindfile::getnextname(), and ASCString::toString(). Referenced by execuseraction(). |
|
|
Definition at line 2321 of file basestrm.cpp. References ascDirectory, and searchDirNum. Referenced by ASC_PG_App::ASC_PG_App(), checkFileLoadability(), initFileIO(), readgameoptions(), and showSearchPath(). |
|
|
Definition at line 2316 of file basestrm.cpp. References searchDirNum. Referenced by checkFileLoadability(), initFileIO(), and showSearchPath(). |
|
|
Definition at line 926 of file basestrm.cpp. References pathdelimitter. Referenced by constructFileName(), ConfigurationFileLocatorCore::getConfigFileName(), and initFileIO(). |
|
|
Definition at line 1044 of file basestrm.cpp. References ContainerCollector::listContainer(). Referenced by showSearchPath(). |
|
||||||||||||
|
Definition at line 1000 of file basestrm.cpp. References constructFileName(), FileLocation::container, FileLocation::directoryLevel, FileLocation::found, ContainerCollector::getfile(), and searchDirNum. Referenced by execuseraction2(), get_filetime(), and tn_c_lzw_filestream::tn_c_lzw_filestream(). |
|
|
Definition at line 2239 of file basestrm.cpp. References addSearchPath(), ContainerCollector::init(), and searchDirNum. Referenced by initFileIO(). |
|
||||||||||||||||
|
checks whether the regular expression pat matches the string str . This functions only understands dos/windows style wildcards: * and ? Definition at line 1803 of file basestrm.cpp. References patimat(). |
|
||||||||||||||||
|
Definition at line 1776 of file basestrm.cpp. References CASE_SENSITIVE_FILE_NAMES. Referenced by FileSelectionWindow::fileNameEntered(), ContainerCollector::init(), loadStartupMap(), mapeditorMainThread(), patimat(), and tfindfile::tfindfile(). |
|
|
Definition at line 685 of file basestrm.cpp. References stream_close(), stream_read(), and stream_seek(). Referenced by getFieldMask(), IconRepository::getIcon(), loadASCFieldImage(), loadASCFieldImageArray(), loadWave(), Surface::readImageFile(), ASC_PG_App::setIcon(), and StartupScreen::StartupScreen(). |
|
|
Definition at line 672 of file basestrm.cpp. Referenced by SDL_RWFromStream(). |
|
||||||||||||||||||||
|
Definition at line 663 of file basestrm.cpp. References MemoryStreamCopy::readdata(). Referenced by SDL_RWFromStream(). |
|
||||||||||||||||
|
Definition at line 648 of file basestrm.cpp. References MemoryStreamCopy::getPosition(), MemoryStreamCopy::getSize(), and MemoryStreamCopy::seek(). Referenced by SDL_RWFromStream(). |
|
|
Definition at line 308 of file basestrm.cpp. Referenced by tnstream::readFloat(). |
|
|
Initial value: { NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL }
Definition at line 65 of file basestrm.cpp. Referenced by addSearchPath(), constructFileName(), getSearchPath(), and tfindfile::tfindfile(). |
|
|
Definition at line 88 of file basestrm.cpp. Referenced by tanycompression::init(). |
|
|
Definition at line 863 of file basestrm.cpp. |
|
|
Definition at line 84 of file basestrm.cpp. Referenced by tncontainerstream::tncontainerstream(). |
|
|
Definition at line 86 of file basestrm.cpp. Referenced by tanycompression::init(). |
|
|
Definition at line 63 of file basestrm.cpp. Referenced by tfindfile::tfindfile(). |
|
|
Definition at line 87 of file basestrm.cpp. Referenced by tanycompression::init(). |
|
|
Definition at line 64 of file basestrm.cpp. Referenced by addSearchPath(), getSearchPath(), getSearchPathNum(), ContainerCollector::init(), locateFile(), opencontainer(), and tfindfile::tfindfile(). |
1.4.2