freemyipod r184 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r183‎ | r184 | r185 >
Date:23:04, 30 August 2010
Author:farthen
Status:new
Tags:
Comment:
Make the ipodnano2g installer compile without errors. The ucl lib still throws some warnings...
Modified paths:
  • /apps/installer-nano2g/Makefile (modified) (history)
  • /apps/installer-nano2g/flashfiles (deleted) (history)
  • /apps/installer-nano2g/libucl/n2_99.ch (modified) (history)
  • /apps/installer-nano2g/libucl/ucl_conf.h (modified) (history)
  • /apps/installer-nano2g/libucl/ucl_init.c (modified) (history)
  • /embios/trunk/export/syscallapi.h (modified) (history)

Diff [purge]

Index: apps/installer-nano2g/flashfiles/iloader.conf
@@ -1,45 +0,0 @@
2 -# nothing center right center+right left center+left left+right center+left+right
3 -.word(notheme) .word(notheme) .word(notheme) .word(quit) .word(notheme) .word(diagmode) .word(notheme) .word(notheme)
4 -.word(diskmode) .word(diskmode) .word(notheme) .word(notheme) .word(notheme) .word(notheme) .word(notheme) .word(notheme) # +play
5 -.word(notheme) .word(notheme) .word(notheme) .word(notheme) .word(notheme) .word(notheme) .word(notheme) .word(notheme) # +menu
6 -.word(notheme) .word(notheme) .word(notheme) .word(notheme) .word(notheme) .word(notheme) .word(notheme) .word(notheme) # +play+menu
7 -
8 -# error handler
9 -.word(0xffffffff)
10 -
11 -notheme:
12 - fillrect(0, 0, 176, 132, 0xffff)
13 - text(16, 16, 0x0000, 0xffff, "Could not load iLoader\0")
14 - text(16, 24, 0x0000, 0xffff, "theme. It was probably\0")
15 - text(16, 32, 0x0000, 0xffff, "deleted. Please choose\0")
16 - text(16, 40, 0x0000, 0xffff, "an option below:\0")
17 - blit()
18 - backlight(1, 55, 10)
19 - menu(nothememenu, 0, 0xffffffff, 0xfffffffe, 0xffffffff, 0xfffffffe, 0)
20 -
21 -nothememenu:
22 - .menuentry(" Uninstall iLoader \0", 16, 56, 0x0000, 0xffff, 0xffff, 0x1f00, uninstall)
23 - .menuentry(" Enter disk mode \0", 16, 64, 0x0000, 0xffff, 0xffff, 0x1f00, diskmode)
24 - .menuentry(" Quit iLoader \0", 16, 72, 0x0000, 0xffff, 0xffff, 0x1f00, quit)
25 - .menuentry(" Power off \0", 16, 80, 0x0000, 0xffff, 0xffff, 0x1f00, off)
26 - .word(0)
27 -
28 -diskmode:
29 - readflash(0x08000000, "diskmode")
30 - backlight(1, 10, 10)
31 - exec(0x08000000)
32 -
33 -quit:
34 - terminate()
35 -
36 -diagmode:
37 - readflash(0x08000000, "diagmode")
38 - backlight(1, 177, 32)
39 - exec(0x08000000)
40 -
41 -uninstall:
42 - readflash(0x08800000, "uninst ")
43 - execembiosapp(0x08800000, 1)
44 -
45 -off:
46 - poweroff()
Index: apps/installer-nano2g/flashfiles
Property changes on: apps/installer-nano2g/flashfiles
___________________________________________________________________
Deleted: svn:ignore
## -1,8 +0,0 ##
47 -embios-ipodnano2g.bin
48 -embios-ipodnano2g.ucl
49 -embiosldr-ipodnano2g.dfu
50 -iloader.cfg
51 -iloader.cfg.ucl
52 -iloader.conf
53 -iloader.embiosapp.ucl
54 -uninstaller-nano2g.embiosapp.ucl
Index: apps/installer-nano2g/libucl/ucl_init.c
@@ -28,9 +28,8 @@
2929
3030 #include "ucl_conf.h"
3131 #include "ucl_util.h"
32 -#include <stdio.h>
 32+#include "embiosapp.h"
3333
34 -
3534 #if 0
3635 # define IS_SIGNED(type) (((type) (1ul << (8 * sizeof(type) - 1))) < 0)
3736 # define IS_UNSIGNED(type) (((type) (1ul << (8 * sizeof(type) - 1))) > 0)
Index: apps/installer-nano2g/libucl/n2_99.ch
@@ -36,11 +36,8 @@
3737 #define UCL_DEBUG
3838 #endif
3939
40 -#include <stdio.h>
41 -
4240 #if 0 && !defined(UCL_DEBUG)
4341 #undef NDEBUG
44 -#include <assert.h>
4542 #endif
4643
4744
Index: apps/installer-nano2g/libucl/ucl_conf.h
@@ -45,9 +45,7 @@
4646 // memory checkers
4747 ************************************************************************/
4848
49 -#if defined(__BOUNDS_CHECKING_ON)
50 -# include <unchecked.h>
51 -#else
 49+#if !defined(__BOUNDS_CHECKING_ON)
5250 # define BOUNDS_CHECKING_OFF_DURING(stmt) stmt
5351 # define BOUNDS_CHECKING_OFF_IN_EXPR(expr) (expr)
5452 #endif
@@ -58,27 +56,10 @@
5957 ************************************************************************/
6058
6159 #if !defined(UCL_HAVE_CONFIG_H)
62 -# include <stddef.h> /* ptrdiff_t, size_t */
63 -# include <string.h> /* memcpy, memmove, memcmp, memset */
64 -# if !defined(NO_STDLIB_H)
65 -# include <stdlib.h>
66 -# endif
6760 # define HAVE_MEMCMP
6861 # define HAVE_MEMCPY
6962 # define HAVE_MEMMOVE
7063 # define HAVE_MEMSET
71 -#else
72 -# include <sys/types.h>
73 -# if defined(STDC_HEADERS)
74 -# include <string.h>
75 -# include <stdlib.h>
76 -# endif
77 -# if defined(HAVE_STDDEF_H)
78 -# include <stddef.h>
79 -# endif
80 -# if defined(HAVE_MEMORY_H)
81 -# include <memory.h>
82 -# endif
8364 #endif
8465
8566 #if defined(__UCL_DOS16) || defined(__UCL_WIN16)
@@ -91,12 +72,6 @@
9273 #if !defined(UCL_DEBUG)
9374 # define NDEBUG
9475 #endif
95 -#if 1 || defined(UCL_DEBUG) || !defined(NDEBUG)
96 -# if !defined(NO_STDIO_H)
97 -# include <stdio.h>
98 -# endif
99 -#endif
100 -#include <assert.h>
10176
10277
10378 #if !defined(UCL_UNUSED)
Index: apps/installer-nano2g/Makefile
@@ -163,6 +163,10 @@
164164 @echo [COMCFG] $@
165165 @$(COMPILECONFIG) $< $@
166166
 167+flashfiles/iloader.conf:
 168+ @echo [CP] $@
 169+ @cp $(ILOADERDIR)/themes/default/source/iloader.conf flashfiles/iloader.conf
 170+
167171 flashfiles/iloader.cfg.ucl: flashfiles/iloader.cfg
168172 @echo [UCL] $<
169173 @$(UCLPACK) $< $@
@@ -204,5 +208,6 @@
205209
206210 clean:
207211 @rm -rf build
 212+ @rm -rf flashfiles
208213
209214 .PHONY: all clean uninstaller-nano2g iloader embios embiosldr-ipodnano2g libucl flashfiles $(NAME)
Index: embios/trunk/export/syscallapi.h
@@ -25,8 +25,10 @@
2626 #define __SYSCALLAPI_H__
2727
2828
 29+#include "../libc/include/assert.h"
 30+
2931 #include "../global.h"
30 -#include "../panic.h"
 32+#include "../panic.h"
3133 #include "../console.h"
3234 #include "../disk.h"
3335 #include "../dir.h"