ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit 53dc71398556e0a086cf41a610e2104b7fae7937
parent d1d2f113b43d8a27a773035dbfad342b7c479d26
Author: ByteProject <stefan.vogt@byteproject.net>
Date:   Thu, 22 Dec 2011 00:38:33 +0100

refactored strtolower(), now all classes with .C extension

Diffstat:
Mansilove.xcodeproj/project.pbxproj | 88++++++++++++++++++++++++++++++++++++++++----------------------------------------
Ransilove/ansilove.m -> ansilove/ansilove.c | 0
Ransilove/load_adf.m -> ansilove/load_adf.c | 0
Ransilove/load_ansi.m -> ansilove/load_ansi.c | 0
Ransilove/load_binary.m -> ansilove/load_binary.c | 0
Ransilove/load_idf.m -> ansilove/load_idf.c | 0
Ransilove/load_pcboard.m -> ansilove/load_pcboard.c | 0
Ransilove/load_tundra.m -> ansilove/load_tundra.c | 0
Ransilove/load_xbin.m -> ansilove/load_xbin.c | 0
Ransilove/main.m -> ansilove/main.c | 0
Aansilove/strtolower.c | 21+++++++++++++++++++++
Dansilove/strtolower.m | 21---------------------
Ransilove/substr.m -> ansilove/substr.c | 0
13 files changed, 65 insertions(+), 65 deletions(-)

diff --git a/ansilove.xcodeproj/project.pbxproj b/ansilove.xcodeproj/project.pbxproj @@ -7,20 +7,20 @@ objects = { /* Begin PBXBuildFile section */ - F8AE164214A130FE00393A1C /* ansilove.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163914A130FE00393A1C /* ansilove.m */; }; - F8AE164314A130FE00393A1C /* load_adf.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163A14A130FE00393A1C /* load_adf.m */; }; - F8AE164414A130FE00393A1C /* load_ansi.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163B14A130FE00393A1C /* load_ansi.m */; }; - F8AE164514A130FE00393A1C /* load_binary.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163C14A130FE00393A1C /* load_binary.m */; }; - F8AE164614A130FE00393A1C /* load_idf.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163D14A130FE00393A1C /* load_idf.m */; }; - F8AE164714A130FE00393A1C /* load_pcboard.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163E14A130FE00393A1C /* load_pcboard.m */; }; - F8AE164814A130FE00393A1C /* load_tundra.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163F14A130FE00393A1C /* load_tundra.m */; }; - F8AE164914A130FE00393A1C /* load_xbin.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AE164014A130FE00393A1C /* load_xbin.m */; }; - F8AE164A14A130FE00393A1C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F8AE164114A130FE00393A1C /* main.m */; }; + F8AE164214A130FE00393A1C /* ansilove.c in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163914A130FE00393A1C /* ansilove.c */; }; + F8AE164314A130FE00393A1C /* load_adf.c in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163A14A130FE00393A1C /* load_adf.c */; }; + F8AE164414A130FE00393A1C /* load_ansi.c in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163B14A130FE00393A1C /* load_ansi.c */; }; + F8AE164514A130FE00393A1C /* load_binary.c in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163C14A130FE00393A1C /* load_binary.c */; }; + F8AE164614A130FE00393A1C /* load_idf.c in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163D14A130FE00393A1C /* load_idf.c */; }; + F8AE164714A130FE00393A1C /* load_pcboard.c in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163E14A130FE00393A1C /* load_pcboard.c */; }; + F8AE164814A130FE00393A1C /* load_tundra.c in Sources */ = {isa = PBXBuildFile; fileRef = F8AE163F14A130FE00393A1C /* load_tundra.c */; }; + F8AE164914A130FE00393A1C /* load_xbin.c in Sources */ = {isa = PBXBuildFile; fileRef = F8AE164014A130FE00393A1C /* load_xbin.c */; }; + F8AE164A14A130FE00393A1C /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = F8AE164114A130FE00393A1C /* main.c */; }; F8D6327C14A08C0F00C5352F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8D6327B14A08C0F00C5352F /* Foundation.framework */; }; F8D6327F14A08C0F00C5352F /* old_main.m in Sources */ = {isa = PBXBuildFile; fileRef = F8D6327E14A08C0F00C5352F /* old_main.m */; }; F8D6328314A08C0F00C5352F /* ansilove.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = F8D6328214A08C0F00C5352F /* ansilove.1 */; }; - F8FBC5BB14A1DE640034BF83 /* strtolower.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FBC5BA14A1DE640034BF83 /* strtolower.m */; }; - F8FBC5C314A1E2900034BF83 /* substr.m in Sources */ = {isa = PBXBuildFile; fileRef = F8FBC5C214A1E2900034BF83 /* substr.m */; }; + F8FBC5BB14A1DE640034BF83 /* strtolower.c in Sources */ = {isa = PBXBuildFile; fileRef = F8FBC5BA14A1DE640034BF83 /* strtolower.c */; }; + F8FBC5C314A1E2900034BF83 /* substr.c in Sources */ = {isa = PBXBuildFile; fileRef = F8FBC5C214A1E2900034BF83 /* substr.c */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -37,15 +37,15 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - F8AE163914A130FE00393A1C /* ansilove.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ansilove.m; sourceTree = "<group>"; }; - F8AE163A14A130FE00393A1C /* load_adf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = load_adf.m; sourceTree = "<group>"; }; - F8AE163B14A130FE00393A1C /* load_ansi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = load_ansi.m; sourceTree = "<group>"; }; - F8AE163C14A130FE00393A1C /* load_binary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = load_binary.m; sourceTree = "<group>"; }; - F8AE163D14A130FE00393A1C /* load_idf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = load_idf.m; sourceTree = "<group>"; }; - F8AE163E14A130FE00393A1C /* load_pcboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = load_pcboard.m; sourceTree = "<group>"; }; - F8AE163F14A130FE00393A1C /* load_tundra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = load_tundra.m; sourceTree = "<group>"; }; - F8AE164014A130FE00393A1C /* load_xbin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = load_xbin.m; sourceTree = "<group>"; }; - F8AE164114A130FE00393A1C /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; + F8AE163914A130FE00393A1C /* ansilove.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ansilove.c; sourceTree = "<group>"; }; + F8AE163A14A130FE00393A1C /* load_adf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = load_adf.c; sourceTree = "<group>"; }; + F8AE163B14A130FE00393A1C /* load_ansi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = load_ansi.c; sourceTree = "<group>"; }; + F8AE163C14A130FE00393A1C /* load_binary.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = load_binary.c; sourceTree = "<group>"; }; + F8AE163D14A130FE00393A1C /* load_idf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = load_idf.c; sourceTree = "<group>"; }; + F8AE163E14A130FE00393A1C /* load_pcboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = load_pcboard.c; sourceTree = "<group>"; }; + F8AE163F14A130FE00393A1C /* load_tundra.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = load_tundra.c; sourceTree = "<group>"; }; + F8AE164014A130FE00393A1C /* load_xbin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = load_xbin.c; sourceTree = "<group>"; }; + F8AE164114A130FE00393A1C /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; }; F8D6327714A08C0F00C5352F /* ansilove */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ansilove; sourceTree = BUILT_PRODUCTS_DIR; }; F8D6327B14A08C0F00C5352F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; F8D6327E14A08C0F00C5352F /* old_main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = old_main.m; sourceTree = "<group>"; }; @@ -53,9 +53,9 @@ F8D6328214A08C0F00C5352F /* ansilove.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = ansilove.1; sourceTree = "<group>"; }; F8D6328D14A0920900C5352F /* alconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = alconfig.h; sourceTree = "<group>"; }; F8FBC5B914A1DE640034BF83 /* strtolower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strtolower.h; sourceTree = "<group>"; }; - F8FBC5BA14A1DE640034BF83 /* strtolower.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = strtolower.m; sourceTree = "<group>"; }; + F8FBC5BA14A1DE640034BF83 /* strtolower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strtolower.c; sourceTree = "<group>"; }; F8FBC5C114A1E2900034BF83 /* substr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = substr.h; sourceTree = "<group>"; }; - F8FBC5C214A1E2900034BF83 /* substr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = substr.m; sourceTree = "<group>"; }; + F8FBC5C214A1E2900034BF83 /* substr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = substr.c; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -101,15 +101,15 @@ isa = PBXGroup; children = ( F8D6328D14A0920900C5352F /* alconfig.h */, - F8AE164114A130FE00393A1C /* main.m */, - F8AE163914A130FE00393A1C /* ansilove.m */, - F8AE163A14A130FE00393A1C /* load_adf.m */, - F8AE163B14A130FE00393A1C /* load_ansi.m */, - F8AE163C14A130FE00393A1C /* load_binary.m */, - F8AE163D14A130FE00393A1C /* load_idf.m */, - F8AE163E14A130FE00393A1C /* load_pcboard.m */, - F8AE163F14A130FE00393A1C /* load_tundra.m */, - F8AE164014A130FE00393A1C /* load_xbin.m */, + F8AE164114A130FE00393A1C /* main.c */, + F8AE163914A130FE00393A1C /* ansilove.c */, + F8AE163A14A130FE00393A1C /* load_adf.c */, + F8AE163B14A130FE00393A1C /* load_ansi.c */, + F8AE163C14A130FE00393A1C /* load_binary.c */, + F8AE163D14A130FE00393A1C /* load_idf.c */, + F8AE163E14A130FE00393A1C /* load_pcboard.c */, + F8AE163F14A130FE00393A1C /* load_tundra.c */, + F8AE164014A130FE00393A1C /* load_xbin.c */, ); name = Classes; path = ansilove; @@ -130,9 +130,9 @@ isa = PBXGroup; children = ( F8FBC5B914A1DE640034BF83 /* strtolower.h */, - F8FBC5BA14A1DE640034BF83 /* strtolower.m */, + F8FBC5BA14A1DE640034BF83 /* strtolower.c */, F8FBC5C114A1E2900034BF83 /* substr.h */, - F8FBC5C214A1E2900034BF83 /* substr.m */, + F8FBC5C214A1E2900034BF83 /* substr.c */, ); name = "PHP additions"; path = ansilove; @@ -189,17 +189,17 @@ buildActionMask = 2147483647; files = ( F8D6327F14A08C0F00C5352F /* old_main.m in Sources */, - F8AE164214A130FE00393A1C /* ansilove.m in Sources */, - F8AE164314A130FE00393A1C /* load_adf.m in Sources */, - F8AE164414A130FE00393A1C /* load_ansi.m in Sources */, - F8AE164514A130FE00393A1C /* load_binary.m in Sources */, - F8AE164614A130FE00393A1C /* load_idf.m in Sources */, - F8AE164714A130FE00393A1C /* load_pcboard.m in Sources */, - F8AE164814A130FE00393A1C /* load_tundra.m in Sources */, - F8AE164914A130FE00393A1C /* load_xbin.m in Sources */, - F8AE164A14A130FE00393A1C /* main.m in Sources */, - F8FBC5BB14A1DE640034BF83 /* strtolower.m in Sources */, - F8FBC5C314A1E2900034BF83 /* substr.m in Sources */, + F8AE164214A130FE00393A1C /* ansilove.c in Sources */, + F8AE164314A130FE00393A1C /* load_adf.c in Sources */, + F8AE164414A130FE00393A1C /* load_ansi.c in Sources */, + F8AE164514A130FE00393A1C /* load_binary.c in Sources */, + F8AE164614A130FE00393A1C /* load_idf.c in Sources */, + F8AE164714A130FE00393A1C /* load_pcboard.c in Sources */, + F8AE164814A130FE00393A1C /* load_tundra.c in Sources */, + F8AE164914A130FE00393A1C /* load_xbin.c in Sources */, + F8AE164A14A130FE00393A1C /* main.c in Sources */, + F8FBC5BB14A1DE640034BF83 /* strtolower.c in Sources */, + F8FBC5C314A1E2900034BF83 /* substr.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ansilove/ansilove.m b/ansilove/ansilove.c diff --git a/ansilove/load_adf.m b/ansilove/load_adf.c diff --git a/ansilove/load_ansi.m b/ansilove/load_ansi.c diff --git a/ansilove/load_binary.m b/ansilove/load_binary.c diff --git a/ansilove/load_idf.m b/ansilove/load_idf.c diff --git a/ansilove/load_pcboard.m b/ansilove/load_pcboard.c diff --git a/ansilove/load_tundra.m b/ansilove/load_tundra.c diff --git a/ansilove/load_xbin.m b/ansilove/load_xbin.c diff --git a/ansilove/main.m b/ansilove/main.c diff --git a/ansilove/strtolower.c b/ansilove/strtolower.c @@ -0,0 +1,21 @@ +// +// strtolower.m +// AnsiLove/C +// +// Copyright (c) 2011, Stefan Vogt. All rights reserved. +// http://byteproject.net +// +// Use of this source code is governed by a MIT-style license. +// See the file LICENSE for details. +// + +#import "strtolower.h" + +void strtolower(char str[]) +{ + char *p; + for (p = str; *p != '\0'; ++p) + { + *p = tolower(*p); + } +} diff --git a/ansilove/strtolower.m b/ansilove/strtolower.m @@ -1,21 +0,0 @@ -// -// strtolower.m -// AnsiLove/C -// -// Copyright (c) 2011, Stefan Vogt. All rights reserved. -// http://byteproject.net -// -// Use of this source code is governed by a MIT-style license. -// See the file LICENSE for details. -// - -#import "strtolower.h" - -void strtolower(char str[]) { - while(*str != 0) { - if (*str >= 'A' && *str <= 'Z') { - *str = *str + 'a' - 'A'; - } - str++; - } -} diff --git a/ansilove/substr.m b/ansilove/substr.c