Data Structures | Functions

# script_scanner.cpp File Reference

Allows scanning for scripts. More...

`#include "../stdafx.h"`
`#include "../debug.h"`
`#include "../string_func.h"`
`#include "../settings_type.h"`
`#include "../script/squirrel.hpp"`
`#include "script_scanner.hpp"`
`#include "script_info.hpp"`
`#include "../network/network_content.h"`
`#include "../3rdparty/md5/md5.h"`
`#include "../tar_type.h"`

Go to the source code of this file.

## Data Structures
struct | ScriptFileChecksumCreator
| Helper for creating a MD5sum of all files within of a script. More...
## Functions
static bool | IsSameScript (const ContentInfo *ci, bool md5sum, ScriptInfo *info, Subdirectory dir)
| Check whether the script given in info is the same as in ci based on the shortname and md5 sum.

## Detailed Description

Allows scanning for scripts.

Definition in file script_scanner.cpp.

## Function Documentation

static bool IsSameScript | ( | const ContentInfo * | ci,
|  | bool | md5sum,
|  | ScriptInfo * | info,
|  | Subdirectory | dir |
| ) |  |  | `[static]`

Check whether the script given in info is the same as in ci based on the shortname and md5 sum.

Parameters:

  | ci | The information to compare to.
  | md5sum | Whether to check the MD5 checksum.
  | info | The script to get the shortname and md5 sum from.

Returns:
  True iff they're the same.

Definition at line 227 of file script_scanner.cpp.

References ScriptFileChecksumCreator::AddFile(), ScriptInfo::GetMainScript(), ScriptInfo::GetShortName(), ScriptInfo::GetTarFile(), lastof, ScriptFileChecksumCreator::md5sum, ContentInfo::md5sum, FileScanner::Scan(), strecpy(), and ContentInfo::unique_id.

Referenced by ScriptScanner::FindMainScript().