Remove unused MacOS code.

This commit is contained in:
2021-03-14 07:13:13 +00:00
parent 8b1843731f
commit 10efebaef6
17 changed files with 29 additions and 179 deletions

View File

@@ -29,25 +29,16 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "attr.h"
#include "macos.h"
@@ -63,7 +54,6 @@ void FileAttributes(const char* path)
FInfo finderInfo;
int32_t count;
HParamBlockRec fpb;
CInfoPBRec cipbr;
HParamBlockRec dirPB;
int i;

View File

@@ -5,6 +5,12 @@
#ifndef SETTER_SRC_MACOS_ATTR_H_
#define SETTER_SRC_MACOS_ATTR_H_
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <MacTypes.h>
#include "macos.h"
typedef struct

View File

@@ -29,40 +29,28 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "macos.h"
void DeleteFiles(const char* path)
{
OSErr rc, wRc, cRc;
OSErr rc;
Str255 str255;
HVolumeParam hpb;
int16_t refNum;
int16_t refFile;
int32_t dirId;
FInfo finderInfo;
int32_t count;
char filename[9];
int pos = 0;
int pos;
HParamBlockRec dirPB;
snprintf((char*)str255, 255, "%s", path);

View File

@@ -29,38 +29,22 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "macos.h"
void DirectoryDepth(const char* path)
{
OSErr rc, wRc, cRc;
OSErr rc;
Str255 str255;
HVolumeParam hpb;
int16_t refNum;
int16_t refFile;
int32_t dirId;
FInfo finderInfo;
int32_t count;
char filename[9];
int pos = 0;
HParamBlockRec dirPB;
@@ -92,8 +76,6 @@ void DirectoryDepth(const char* path)
return;
}
dirId = dirPB.fileParam.ioDirID;
printf("Creating deepest directory tree.\n");
while(!rc)

View File

@@ -29,22 +29,14 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"

View File

@@ -29,22 +29,14 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"

View File

@@ -29,19 +29,12 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

View File

@@ -41,20 +41,16 @@ Copyright (C) 2011-2021 Natalia Portillo
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "links.h"
#include "macos.h"
static pascal OSErr
CreateAliasFile(const FSSpec* targetFile, const FSSpec* aliasFile, OSType fileCreator, OSType fileType)
static pascal OSErr CreateAliasFile(FSSpec* targetFile, FSSpec* aliasFile, OSType fileCreator, OSType fileType)
{
short rsrcID;
short aliasRefnum;
@@ -97,7 +93,7 @@ void Links(const char* path)
int16_t refFile;
int32_t dirId;
char filename[9];
int pos = 0;
int pos;
FSSpec targetSpec, aliasSpec;
int32_t count;
HParamBlockRec dirPB;

View File

@@ -5,6 +5,15 @@
#ifndef SETTER_SRC_MACOS_LINKS_H_
#define SETTER_SRC_MACOS_LINKS_H_
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#include <Files.h>
#include <MacTypes.h>
static pascal OSErr CreateAliasFile(FSSpec* targetFile, FSSpec* aliasFile, OSType fileCreator, OSType fileType);
const char* targetText = "This file is the target of an alias.\r";
#endif // SETTER_SRC_MACOS_LINKS_H_

View File

@@ -29,25 +29,11 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "macos.h"

View File

@@ -29,27 +29,7 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "macos.h"
void FilePermissions(const char* path)
{ /* Do nothing, not supported by target operating system */

View File

@@ -29,25 +29,17 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "macos.h"
#include "rsrcfork.h"
@@ -101,7 +93,6 @@ void ResourceFork(const char* path)
FInfo finderInfo;
int32_t count;
HParamBlockRec fpb;
CInfoPBRec cipbr;
HParamBlockRec dirPB;
snprintf((char*)str255, 255, "%s", path);

View File

@@ -5,6 +5,15 @@
#ifndef SETTER_SRC_MACOS_RSRCFORK_H_
#define SETTER_SRC_MACOS_RSRCFORK_H_
static OSErr SaveResourceToNewFile(int16_t vRefNum,
int32_t dirID,
Str255 filename,
ResType type,
int16_t resId,
Str255 resName,
unsigned char* buffer,
size_t length);
const char* rsrcText = "This file has a custom icon, a version, and a picture, in the resource fork.\r";
const unsigned char IcnsResource[5618] = {

View File

@@ -29,27 +29,7 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "macos.h"
void Sparse(const char* path)
{ /* Do nothing, not supported by target operating system */

View File

@@ -29,25 +29,15 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "macos.h"
#include "time.h"
@@ -60,7 +50,6 @@ void Timestamps(const char* path)
int16_t refNum;
int16_t refFile;
int32_t dirId;
FInfo finderInfo;
int32_t count;
HFileInfo* fpb;
CInfoPBRec cipbr;

View File

@@ -29,25 +29,12 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "macos.h"

View File

@@ -29,27 +29,7 @@ Copyright (C) 2011-2021 Natalia Portillo
#if defined(macintosh)
#if defined(HAVE_ALIASES_H) || !defined(HAVE_MULTIVERSE_H)
#include <Aliases.h>
#endif
#if defined(HAVE_FILE_TYPES_AND_CREATORS_H) || !defined(HAVE_MULTIVERSE_H)
#include <FileTypesAndCreators.h>
#endif
#include <Files.h>
#include <Gestalt.h>
#include <MacTypes.h>
#include <Resources.h>
#include <TextUtils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../include/consts.h"
#include "../include/defs.h"
#include "macos.h"
void ExtendedAttributes(const char* path)
{ /* Do nothing, not supported by target operating system */