Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
Initial Commit of v1.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
christianvozar committed Nov 2, 2017
1 parent 56f20e2 commit d2b25d6
Show file tree
Hide file tree
Showing 22 changed files with 1,512 additions and 1 deletion.
1 change: 1 addition & 0 deletions QLAnsilove/Frameworks/AnsiLove.framework/AnsiLove
1 change: 1 addition & 0 deletions QLAnsilove/Frameworks/AnsiLove.framework/Headers
1 change: 1 addition & 0 deletions QLAnsilove/Frameworks/AnsiLove.framework/Resources
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// ALAnsiGenerator.h
// AnsiLove.framework
//
// Copyright (C) 2011-2015 Stefan Vogt.
// All rights reserved.
//
// This source code is licensed under the BSD 3-Clause License.
// See the file LICENSE for details.
//

#import <Foundation/Foundation.h>

@interface ALAnsiGenerator : NSObject

// Affecting supported output formats.
@property (nonatomic, assign) BOOL generatesRetinaFile;

// Affecting implemented rendering options.
@property (nonatomic, assign) BOOL usesDefaultFont;
@property (nonatomic, assign) BOOL usesDefaultBits;
@property (nonatomic, assign) BOOL usesDefaultColumns;
@property (nonatomic, assign) BOOL hasSauceRecord;

// ANSi file
@property (nonatomic, strong) NSString *ansi_inputFile;
@property (nonatomic, strong) NSString *ansi_outputFile;
@property (nonatomic, strong) NSString *ansi_retinaOutputFile;
@property (nonatomic, strong) NSString *ansi_font;
@property (nonatomic, strong) NSString *ansi_bits;
@property (nonatomic, assign) BOOL ansi_iceColors;
@property (nonatomic, strong) NSString *ansi_columns;
@property (nonatomic, strong) NSString *rawOutputString;

// One method to make the magic happen.
- (void)renderAnsiFile:(NSString *)inputFile
outputFile:(NSString *)outputFile
font:(NSString *)font
bits:(NSString *)bits
iceColors:(BOOL )iceColors
columns:(NSString *)columns
retina:(BOOL )generateRetina;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
//
// ALSauceMachine.h
// AnsiLove.framework
//
// Copyright (C) 2011-2015 Stefan Vogt.
// All rights reserved.
//
// This source code is licensed under the BSD 3-Clause License.
// See the file LICENSE for details.
//
// Based on libsauce. Copyright (c) 2010, Brian Cassidy.
//

#import <Foundation/Foundation.h>

// better readability for strcmp() methods
#define IDENTICAL 0

// internal defines and typedefs
#define RECORD_SIZE 128
#define COMMENT_SIZE 64
#define SAUCE_ID "SAUCE"
#define COMMENT_ID "COMNT"

typedef struct {
char ID[6];
char version[3];
char title[36];
char author[21];
char group[21];
char date[9];
int fileSize;
unsigned char dataType;
unsigned char fileType;
unsigned short tinfo1;
unsigned short tinfo2;
unsigned short tinfo3;
unsigned short tinfo4;
unsigned char comments;
unsigned char flags;
char filler[23];
char **comment_lines;
} sauce;

@interface ALSauceMachine : NSObject

// SAUCE record properties
@property (nonatomic, strong) NSString *ID;
@property (nonatomic, strong) NSString *version;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *author;
@property (nonatomic, strong) NSString *group;
@property (nonatomic, strong) NSString *date;
@property (nonatomic, assign) NSInteger dataType;
@property (nonatomic, assign) NSInteger fileType;
@property (nonatomic, assign) NSInteger tinfo1;
@property (nonatomic, assign) NSInteger tinfo2;
@property (nonatomic, assign) NSInteger tinfo3;
@property (nonatomic, assign) NSInteger tinfo4;
@property (nonatomic, strong) NSString *comments;
@property (nonatomic, assign) NSInteger flags;

// SAUCE record BOOL properties
@property (nonatomic, assign) BOOL fileHasRecord;
@property (nonatomic, assign) BOOL fileHasComments;
@property (nonatomic, assign) BOOL fileHasFlags;

// bridge methods (Cocoa)
- (void)readRecordFromFile:(NSString *)inputFile;

// class internal (ye good olde C)
sauce *sauceReadFileName(char *fileName);
sauce *sauceReadFile(FILE *file);
void readRecord(FILE *file, sauce *record);
void readComments(FILE *file, char **comment_lines, NSInteger comments);
NSInteger sauceWriteFileName(char *fileName, sauce *record);
NSInteger sauceWriteFile(FILE *file, sauce *record);
NSInteger writeRecord(FILE *file, sauce *record);
NSInteger sauceRemoveFileName(char *fileName);
NSInteger sauceRemoveFile(FILE *file);

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// AnsiLove.h
// AnsiLove.framework
//
// Copyright (C) 2011-2015 Stefan Vogt.
// All rights reserved.
//
// This source code is licensed under the BSD 3-Clause License.
// See the file LICENSE for details.
//

#import "ALAnsiGenerator.h"
#import "ALSauceMachine.h"
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>14E46</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>AnsiLove</string>
<key>CFBundleIdentifier</key>
<string>com.byteproject.AnsiLove</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AnsiLove</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>6.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>86</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>6E35b</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>13F34</string>
<key>DTSDKName</key>
<string>macosx10.9</string>
<key>DTXcode</key>
<string>0640</string>
<key>DTXcodeBuild</key>
<string>6E35b</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2011-2015 Stefan Vogt. All rights reserved.</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions QLAnsilove/Frameworks/AnsiLove.framework/Versions/Current
Loading

0 comments on commit d2b25d6

Please sign in to comment.