mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +00:00
[CDMAKE]: Code cleanup (remove useless comments and that setjmp thingie).
svn path=/trunk/; revision=66137
This commit is contained in:
parent
30701b9657
commit
5a6cb60c3d
|
@ -64,7 +64,6 @@
|
||||||
# define FALSE 0
|
# define FALSE 0
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <setjmp.h>
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "dirhash.h"
|
#include "dirhash.h"
|
||||||
|
@ -131,7 +130,6 @@ typedef struct directory_record
|
||||||
WORD path_table_index; /* directory record only */
|
WORD path_table_index; /* directory record only */
|
||||||
} DIR_RECORD, *PDIR_RECORD;
|
} DIR_RECORD, *PDIR_RECORD;
|
||||||
|
|
||||||
|
|
||||||
typedef enum directory_record_type
|
typedef enum directory_record_type
|
||||||
{
|
{
|
||||||
DOT_RECORD,
|
DOT_RECORD,
|
||||||
|
@ -147,7 +145,6 @@ PDIR_RECORD sort_linked_list(PDIR_RECORD,
|
||||||
|
|
||||||
static char DIRECTORY_TIMESTAMP[] = "~Y$'KOR$.3K&";
|
static char DIRECTORY_TIMESTAMP[] = "~Y$'KOR$.3K&";
|
||||||
|
|
||||||
static jmp_buf error;
|
|
||||||
static struct cd_image cd;
|
static struct cd_image cd;
|
||||||
|
|
||||||
char volume_label[32];
|
char volume_label[32];
|
||||||
|
@ -570,14 +567,14 @@ static int check_for_punctuation(int c, const char *name)
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(strcasecmp)
|
|
||||||
#define strcasecmp stricmp
|
|
||||||
#endif//_WIN32
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
This function checks to see if there's a cdname conflict.
|
This function checks to see if there's a cdname conflict.
|
||||||
-----------------------------------------------------------------------------*/
|
-----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(strcasecmp)
|
||||||
|
#define strcasecmp stricmp
|
||||||
|
#endif//_WIN32
|
||||||
|
|
||||||
int cdname_exists(PDIR_RECORD d)
|
int cdname_exists(PDIR_RECORD d)
|
||||||
{
|
{
|
||||||
PDIR_RECORD p = d->parent->first_record;
|
PDIR_RECORD p = d->parent->first_record;
|
||||||
|
@ -722,11 +719,6 @@ new_directory_record(struct dirent *entry,
|
||||||
PDIR_RECORD parent)
|
PDIR_RECORD parent)
|
||||||
{
|
{
|
||||||
PDIR_RECORD d;
|
PDIR_RECORD d;
|
||||||
/*
|
|
||||||
char *s;
|
|
||||||
char *t;
|
|
||||||
char *n;
|
|
||||||
*/
|
|
||||||
|
|
||||||
d = calloc(1, sizeof(*d));
|
d = calloc(1, sizeof(*d));
|
||||||
if (d == NULL)
|
if (d == NULL)
|
||||||
|
@ -1117,8 +1109,8 @@ new_empty_dirrecord(PDIR_RECORD d, BOOL directory)
|
||||||
new_d->next_in_directory = d->first_record;
|
new_d->next_in_directory = d->first_record;
|
||||||
d->first_record = new_d;
|
d->first_record = new_d;
|
||||||
new_d->next_in_memory = root.next_in_memory;
|
new_d->next_in_memory = root.next_in_memory;
|
||||||
new_d->date_and_time = d->date_and_time;
|
|
||||||
root.next_in_memory = new_d;
|
root.next_in_memory = new_d;
|
||||||
|
new_d->date_and_time = d->date_and_time;
|
||||||
if (directory)
|
if (directory)
|
||||||
{
|
{
|
||||||
new_d->flags |= DIRECTORY_FLAG;
|
new_d->flags |= DIRECTORY_FLAG;
|
||||||
|
@ -1730,9 +1722,6 @@ int main(int argc, char **argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setjmp(error))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
// initialize root directory
|
// initialize root directory
|
||||||
|
|
||||||
cd.buffer = malloc(BUFFER_SIZE);
|
cd.buffer = malloc(BUFFER_SIZE);
|
||||||
|
@ -1838,6 +1827,7 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
char *trimmedline, *targetname, *srcname, *eq;
|
char *trimmedline, *targetname, *srcname, *eq;
|
||||||
char lineread[1024];
|
char lineread[1024];
|
||||||
|
|
||||||
FILE *f = fopen(source+1, "r");
|
FILE *f = fopen(source+1, "r");
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef _REACTOS_TOOLS_CDMAKE_DIRHASH_H_
|
#ifndef _DIRHASH_H_
|
||||||
#define _REACTOS_TOOLS_CDMAKE_DIRHASH_H_
|
#define _DIRHASH_H_
|
||||||
|
|
||||||
#define NUM_DIR_HASH_BUCKETS 1024
|
#define NUM_DIR_HASH_BUCKETS 1024
|
||||||
|
|
||||||
|
@ -35,4 +35,4 @@ struct target_dir_entry *
|
||||||
dir_hash_create_dir(struct target_dir_hash *dh, const char *casename, const char *targetnorm);
|
dir_hash_create_dir(struct target_dir_hash *dh, const char *casename, const char *targetnorm);
|
||||||
void dir_hash_destroy(struct target_dir_hash *dh);
|
void dir_hash_destroy(struct target_dir_hash *dh);
|
||||||
|
|
||||||
#endif //_REACTOS_TOOLS_CDMAKE_DIRHASH_H_
|
#endif // _DIRHASH_H_
|
||||||
|
|
Loading…
Reference in a new issue