Skip to content
This repository was archived by the owner on Dec 7, 2017. It is now read-only.

Updated static library settings #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions GEMagicKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
* THE SOFTWARE.
*/

#import <Foundation/Foundation.h>
#import <MagicKit/MagicKit.h>

@class GEMagicResult;

@interface GEMagicKit : NSObject {
Expand Down
1 change: 1 addition & 0 deletions GEMagicKit.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#import "GEMagicKit.h"
#import "GEMagicResult.h"
#import "magic.h"
Expand Down
3 changes: 0 additions & 3 deletions GEMagicResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
* THE SOFTWARE.
*/

#import <Foundation/Foundation.h>
#import <MagicKit/MagicKit.h>

@interface GEMagicResult : NSObject {
NSString *mimeType;
NSString *description;
Expand Down
5 changes: 2 additions & 3 deletions MagicKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@
* THE SOFTWARE.
*/

#import <Foundation/Foundation.h>
#import <MagicKit/GEMagicKit.h>
#import <MagicKit/GEMagicResult.h>
#import "GEMagicKit.h"
#import "GEMagicResult.h"
138 changes: 79 additions & 59 deletions MagicKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MagicKitTest/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ int main (int argc, const char * argv[]) {

[pool drain];
return 0;
}
}
5 changes: 4 additions & 1 deletion MagicKit_Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
//

#ifdef __OBJC__
#import <Cocoa/Cocoa.h>

// #import <Cocoa/Cocoa.h> OS X
#import <Foundation/Foundation.h>

#endif
7 changes: 4 additions & 3 deletions libmagic/strlcat.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* will be copied. Always NUL terminates (unless siz <= strlen(dst)).
* Returns strlen(src) + MIN(siz, strlen(initial dst)).
* If retval >= siz, truncation occurred.
*/
*
size_t
strlcat(char *dst, const char *src, size_t siz)
{
Expand All @@ -37,7 +37,7 @@ strlcat(char *dst, const char *src, size_t siz)
size_t n = siz;
size_t dlen;

/* Find the end of dst and adjust bytes left but don't go past end */
// Find the end of dst and adjust bytes left but don't go past end
while (n-- != 0 && *d != '\0')
d++;
dlen = d - dst;
Expand All @@ -54,5 +54,6 @@ strlcat(char *dst, const char *src, size_t siz)
}
*d = '\0';

return(dlen + (s - src)); /* count does not include NUL */
return(dlen + (s - src)); // count does not include NUL
}
*/
11 changes: 6 additions & 5 deletions libmagic/strlcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,30 @@
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
* Returns strlen(src); if retval >= siz, truncation occurred.
*/
*
size_t
strlcpy(char *dst, const char *src, size_t siz)
{
char *d = dst;
const char *s = src;
size_t n = siz;

/* Copy as many bytes as will fit */
// Copy as many bytes as will fit
if (n != 0 && --n != 0) {
do {
if ((*d++ = *s++) == 0)
break;
} while (--n != 0);
}

/* Not enough room in dst, add NUL and traverse rest of src */
// Not enough room in dst, add NUL and traverse rest of src
if (n == 0) {
if (siz != 0)
*d = '\0'; /* NUL-terminate dst */
*d = '\0'; // NUL-terminate dst
while (*s++)
;
}

return(s - src - 1); /* count does not include NUL */
return(s - src - 1); // count does not include NUL
}
*/