From 8a3824f36a65c777388831c47556f8141b22d463 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 28 Apr 2012 12:06:55 +0200 Subject: ipodpatcher: replace ipod2c with bin2c. Change-Id: I3b339e05c9a5f4a8a60bd7581ec402b4784542e2 --- rbutil/ipodpatcher/ipod2c.c | 142 -------------------------------------------- 1 file changed, 142 deletions(-) delete mode 100644 rbutil/ipodpatcher/ipod2c.c (limited to 'rbutil/ipodpatcher/ipod2c.c') diff --git a/rbutil/ipodpatcher/ipod2c.c b/rbutil/ipodpatcher/ipod2c.c deleted file mode 100644 index 77a3923196..0000000000 --- a/rbutil/ipodpatcher/ipod2c.c +++ /dev/null @@ -1,142 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2007 Dave Chapman - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -static off_t filesize(int fd) -{ - struct stat buf; - - fstat(fd,&buf); - return buf.st_size; -} - -static int write_cfile(unsigned char* buf, off_t len, char* cname) -{ - char filename[256]; - FILE* fp; - int i; - - snprintf(filename,256,"%s.c",cname); - - fp = fopen(filename,"w+"); - if (fp == NULL) { - fprintf(stderr,"Couldn't open %s\n",filename); - return -1; - } - - fprintf(fp,"/* Generated by ipod2c */\n\n"); - fprintf(fp,"unsigned char %s[] = {",cname); - - for (i=0;i