From 52de4a665505b5e5e7c676c58bccc567dd6386ac Mon Sep 17 00:00:00 2001 From: dhewg Date: Mon, 13 Apr 2009 22:13:45 +0200 Subject: [PATCH] License/consistency/whitespace cleanup --- boot2.c | 4 +++- boot2.h | 3 ++- bsdtypes.h | 23 +++++++++++++++++++++++ crypto.c | 4 ++-- crypto.h | 7 ++++--- diskio.c | 5 +++-- diskio.h | 0 errno.h | 3 --- exception.c | 1 + exception.h | 2 +- gecko.c | 4 ++-- gecko.h | 4 +++- gpio.h | 1 + hollywood.h | 5 +++-- ipc.c | 3 ++- ipc.h | 6 ++++-- irq.c | 1 + irq.h | 1 + irq_asm.S | 22 ++++++++++++++++++++++ ldhack.c | 21 ++++++++++++++++++++- main.c | 10 +++++----- memory.c | 1 + memory.h | 1 + memory_asm.S | 1 + mini.ld | 19 +++++++++++++++++++ nand.c | 5 +++-- nand.h | 1 + panic.c | 1 + panic.h | 1 + powerpc.c | 3 ++- powerpc.h | 7 ++++--- powerpc_elf.c | 1 + powerpc_elf.h | 6 ++++-- sdmmc.h | 6 ++++-- seeprom.c | 3 ++- seeprom.h | 5 +++-- start.S | 1 + start.h | 1 + string.c | 2 +- string.h | 10 ++++++++-- types.h | 5 +++-- vsprintf.c | 1 + vsprintf.h | 6 ++++++ 43 files changed, 172 insertions(+), 45 deletions(-) mode change 100755 => 100644 diskio.c mode change 100755 => 100644 diskio.h diff --git a/boot2.c b/boot2.c index b53b298..fbc09bb 100644 --- a/boot2.c +++ b/boot2.c @@ -4,7 +4,8 @@ boot2 chainloader Copyright (C) 2008, 2009 Hector Martin "marcan" -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2009 Andre Heider "dhewg" 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 @@ -392,3 +393,4 @@ u32 boot2_ipc(volatile ipc_request *req) return vector; } + diff --git a/boot2.h b/boot2.h index 8cc0a9d..a62d518 100644 --- a/boot2.h +++ b/boot2.h @@ -4,7 +4,7 @@ boot2 chainloader Copyright (C) 2008, 2009 Hector Martin "marcan" -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter 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 @@ -30,3 +30,4 @@ void boot2_init(); u32 boot2_ipc(volatile ipc_request *req); #endif + diff --git a/bsdtypes.h b/bsdtypes.h index 56d28a1..5f6ade2 100644 --- a/bsdtypes.h +++ b/bsdtypes.h @@ -1,3 +1,24 @@ +/* + mini - a Free Software replacement for the Nintendo/BroadOn IOS. + + BSD types + +Copyright (C) 2008, 2009 Sven Peter + +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, version 2. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ #ifndef __BSDTYPES_H__ #define __BSDTYPES_H__ @@ -26,4 +47,6 @@ struct device { #define ISSET(var, mask) (((var) & (mask)) ? 1 : 0) #define SET(var, mask) ((var) |= (mask)) + #endif + diff --git a/crypto.c b/crypto.c index ea41b7d..4df0255 100644 --- a/crypto.c +++ b/crypto.c @@ -4,7 +4,7 @@ crypto support Copyright (C) 2008, 2009 Haxx Enterprises -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter 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 @@ -62,7 +62,6 @@ void crypto_initialize() void crypto_ipc(volatile ipc_request *req) { - switch (req->req) { case IPC_KEYS_GETOTP: memcpy((void *)req->args[0], &otp, sizeof(otp)); @@ -176,3 +175,4 @@ void aes_ipc(volatile ipc_request *req) } ipc_post(req->code, req->tag, 0); } + diff --git a/crypto.h b/crypto.h index f710a19..8d1c842 100644 --- a/crypto.h +++ b/crypto.h @@ -3,8 +3,8 @@ crypto support -Copyright (C) 2008, 2009 Haxx Enterprises -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Haxx Enterprises +Copyright (C) 2008, 2009 Sven Peter 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 @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __CRYPTO_H__ -#define __CRYPTO_H__ 1 +#define __CRYPTO_H__ #include "types.h" #include "ipc.h" @@ -88,3 +88,4 @@ void aes_decrypt(u8 *src, u8 *dst, u32 blocks, u8 keep_iv); void aes_ipc(volatile ipc_request *req); #endif + diff --git a/diskio.c b/diskio.c old mode 100755 new mode 100644 index 5c2fbcc..8f12ff5 --- a/diskio.c +++ b/diskio.c @@ -3,8 +3,8 @@ glue layer for FatFs -Copyright (C) 2008, 2009 Sven Peter -Copyright (C) 2008, 2009 Haxx Enterprises +Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Haxx Enterprises 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 @@ -96,3 +96,4 @@ DRESULT disk_ioctl (BYTE drv, BYTE ctrl, void *buff) { return RES_PARERR; } #endif /* _USE_IOCTL */ + diff --git a/diskio.h b/diskio.h old mode 100755 new mode 100644 diff --git a/errno.h b/errno.h index c13ef29..319bb7d 100644 --- a/errno.h +++ b/errno.h @@ -1,6 +1,3 @@ -/* $OpenBSD: errno.h,v 1.20 2007/09/03 14:37:52 millert Exp $ */ -/* $NetBSD: errno.h,v 1.10 1996/01/20 01:33:53 jtc Exp $ */ - /* * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. diff --git a/exception.c b/exception.c index 39631ef..9405d1e 100644 --- a/exception.c +++ b/exception.c @@ -121,3 +121,4 @@ void exc_handler(u32 type, u32 spsr, u32 *regs) } panic2(0, PANIC_EXCEPTION); } + diff --git a/exception.h b/exception.h index ff19857..df03f5f 100644 --- a/exception.h +++ b/exception.h @@ -4,7 +4,7 @@ exception handling Copyright (C) 2008, 2009 Hector Martin "marcan" -Copyright (C) 2008, 2009 Haxx Enterprises +Copyright (C) 2008, 2009 Haxx Enterprises 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 diff --git a/gecko.c b/gecko.c index 67b7d71..00d4b09 100644 --- a/gecko.c +++ b/gecko.c @@ -4,7 +4,8 @@ boot2 chainloader Copyright (C) 2008, 2009 Hector Martin "marcan" -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2009 Andre Heider "dhewg" 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 @@ -292,7 +293,6 @@ void gecko_timer(void) { // sorry pal, that memory is mine now powerpc_hang(); - gecko_printf("MINI/GECKO: PPC halted, receiving data...\n"); } return; diff --git a/gecko.h b/gecko.h index 76bac98..6a27578 100644 --- a/gecko.h +++ b/gecko.h @@ -4,7 +4,8 @@ boot2 chainloader Copyright (C) 2008, 2009 Hector Martin "marcan" -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2009 Andre Heider "dhewg" 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 @@ -32,3 +33,4 @@ void gecko_timer_initialize(void); void gecko_timer(void); #endif + diff --git a/gpio.h b/gpio.h index 41b18b3..a052202 100644 --- a/gpio.h +++ b/gpio.h @@ -66,3 +66,4 @@ enum { #define GP_PPC_DEFAULT_ON (GP_DEFAULT_ON & GP_OWNER_PPC) #endif + diff --git a/hollywood.h b/hollywood.h index ebfddbb..b8a6cfa 100644 --- a/hollywood.h +++ b/hollywood.h @@ -3,8 +3,8 @@ Hollywood register definitions -Copyright (C) 2008, 2009 Haxx Enterprises -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Haxx Enterprises +Copyright (C) 2008, 2009 Sven Peter Copyright (C) 2008, 2009 Hector Martin "marcan" This program is free software; you can redistribute it and/or modify @@ -195,3 +195,4 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #define MEM_FLUSHACK (MEM_REG_BASE+0x22a) #endif + diff --git a/ipc.c b/ipc.c index d39700d..899b577 100644 --- a/ipc.c +++ b/ipc.c @@ -5,7 +5,8 @@ Copyright (C) 2008, 2009 Hector Martin "marcan" Copyright (C) 2008, 2009 Haxx Enterprises -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2009 Andre Heider "dhewg" 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 diff --git a/ipc.h b/ipc.h index 72e7416..4a1ac31 100644 --- a/ipc.h +++ b/ipc.h @@ -4,8 +4,9 @@ inter-processor communications Copyright (C) 2008, 2009 Hector Martin "marcan" -Copyright (C) 2008, 2009 Haxx Enterprises +Copyright (C) 2008, 2009 Haxx Enterprises +Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2009 Andre Heider "dhewg" 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 @@ -151,3 +152,4 @@ u32 ipc_process_slow(void); void ipc_add_slow(volatile ipc_request *req); #endif + diff --git a/irq.c b/irq.c index 2fe7156..89e45ee 100644 --- a/irq.c +++ b/irq.c @@ -4,6 +4,7 @@ IRQ support Copyright (C) 2008, 2009 Hector Martin "marcan" +Copyright (C) 2009 Andre Heider "dhewg" 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 diff --git a/irq.h b/irq.h index ac80972..a446648 100644 --- a/irq.h +++ b/irq.h @@ -80,3 +80,4 @@ void irq_set_alarm(u32 ms, u8 enable); #endif #endif + diff --git a/irq_asm.S b/irq_asm.S index a168be6..7ab6501 100644 --- a/irq_asm.S +++ b/irq_asm.S @@ -1,3 +1,24 @@ +/* + mini - a Free Software replacement for the Nintendo/BroadOn IOS. + + exception handling + +Copyright (C) 2008, 2009 Hector Martin "marcan" + +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, version 2. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ #include "hollywood.h" #include "irq.h" @@ -41,3 +62,4 @@ irq_restore: orr r1, r1, r0 msr cpsr_c, r1 bx lr + diff --git a/ldhack.c b/ldhack.c index e5402b9..ff2a1c9 100644 --- a/ldhack.c +++ b/ldhack.c @@ -1,4 +1,23 @@ -/* This makes LD avoid including the exception unwinder for long long division support */ +/* + mini - a Free Software replacement for the Nintendo/BroadOn IOS. +Copyright (C) 2008, 2009 Hector Martin "marcan" + +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, version 2. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + +// This makes LD avoid including the exception unwinder for long long division support char __aeabi_unwind_cpp_pr0[0]; diff --git a/main.c b/main.c index 941253f..86ddde0 100644 --- a/main.c +++ b/main.c @@ -1,10 +1,10 @@ /* mini - a Free Software replacement for the Nintendo/BroadOn IOS. -Copyright (C) 2008, 2009 Haxx Enterprises +Copyright (C) 2008, 2009 Haxx Enterprises +Copyright (C) 2008, 2009 Sven Peter Copyright (C) 2008, 2009 Hector Martin "marcan" -TODO add yourself here, kthx +Copyright (C) 2009 Andre Heider "dhewg" 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 @@ -48,7 +48,7 @@ u32 _main(void *base) int res; u32 vector; (void)base; - + gecko_init(); gecko_printf("mini v0.2 loading\n"); @@ -83,7 +83,6 @@ u32 _main(void *base) gecko_printf("Initializing SDHC...\n"); sdhc_init(); -// sd_initialize(); gecko_printf("Mounting SD...\n"); fres = f_mount(0, &fatfs); @@ -122,3 +121,4 @@ shutdown: gecko_printf("Vectoring to 0x%08x...\n", vector); return vector; } + diff --git a/memory.c b/memory.c index 6137c90..07cca7e 100644 --- a/memory.c +++ b/memory.c @@ -378,3 +378,4 @@ void mem_shutdown(void) _tlb_inval(); irq_restore(cookie); } + diff --git a/memory.h b/memory.h index ae0a19c..8e23fbc 100644 --- a/memory.h +++ b/memory.h @@ -119,3 +119,4 @@ static inline void dc_flush_block_fast(void *block) } #endif + diff --git a/memory_asm.S b/memory_asm.S index facf897..d547f5f 100644 --- a/memory_asm.S +++ b/memory_asm.S @@ -69,3 +69,4 @@ _tlb_inval: mov r0, #0 mcr p15, 0, r0, c8, c7 bx lr + diff --git a/mini.ld b/mini.ld index acb27b1..402d1e1 100644 --- a/mini.ld +++ b/mini.ld @@ -1,3 +1,22 @@ +/* + mini - a Free Software replacement for the Nintendo/BroadOn IOS. + +Copyright (C) 2008, 2009 Hector Martin "marcan" + +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, version 2. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ OUTPUT_FORMAT("elf32-bigarm") OUTPUT_ARCH(arm) EXTERN(_start) diff --git a/nand.c b/nand.c index 92d4919..9e49e83 100644 --- a/nand.c +++ b/nand.c @@ -3,8 +3,8 @@ low-level NAND support -Copyright (C) 2008, 2009 Haxx Enterprises -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Haxx Enterprises +Copyright (C) 2008, 2009 Sven Peter Copyright (C) 2008, 2009 Hector Martin "marcan" This program is free software; you can redistribute it and/or modify @@ -353,3 +353,4 @@ void nand_ipc(volatile ipc_request *req) } } + diff --git a/nand.h b/nand.h index 58fee12..0378a0c 100644 --- a/nand.h +++ b/nand.h @@ -56,3 +56,4 @@ void nand_initialize(); void nand_ipc(volatile ipc_request *req); #endif + diff --git a/panic.c b/panic.c index 62d7f7b..b7f6aba 100644 --- a/panic.c +++ b/panic.c @@ -58,3 +58,4 @@ void panic2(int mode, ...) udelay(PANIC_INTER); } } + diff --git a/panic.h b/panic.h index a11ab3b..508fba2 100644 --- a/panic.h +++ b/panic.h @@ -29,3 +29,4 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA void panic2(int mode, ...) __attribute__ ((noreturn)); #endif + diff --git a/powerpc.c b/powerpc.c index 758ddec..32d03d7 100644 --- a/powerpc.c +++ b/powerpc.c @@ -3,7 +3,8 @@ PowerPC support code -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2009 Andre Heider "dhewg" 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 diff --git a/powerpc.h b/powerpc.h index 306f209..5c02ec9 100644 --- a/powerpc.h +++ b/powerpc.h @@ -3,7 +3,8 @@ PowerPC support code -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2009 Andre Heider "dhewg" 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 @@ -19,8 +20,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __POWERPC_H__ -#define __POWERPC_H__ 1 +#ifndef __POWERPC_H__ +#define __POWERPC_H__ #include "ipc.h" diff --git a/powerpc_elf.c b/powerpc_elf.c index bb0d593..aa5feff 100644 --- a/powerpc_elf.c +++ b/powerpc_elf.c @@ -4,6 +4,7 @@ PowerPC ELF file loading Copyright (C) 2008, 2009 Hector Martin "marcan" +Copyright (C) 2009 Andre Heider "dhewg" 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 diff --git a/powerpc_elf.h b/powerpc_elf.h index e163e0d..360fb5d 100644 --- a/powerpc_elf.h +++ b/powerpc_elf.h @@ -4,6 +4,7 @@ PowerPC ELF file loading Copyright (C) 2008, 2009 Hector Martin "marcan" +Copyright (C) 2009 Andre Heider "dhewg" 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 @@ -19,10 +20,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __POWERPC_ELF_H__ -#define __POWERPC_ELF_H__ 1 +#ifndef __POWERPC_ELF_H__ +#define __POWERPC_ELF_H__ int powerpc_boot_file(const char *path); int powerpc_boot_mem(const u8 *addr, u32 len); #endif + diff --git a/sdmmc.h b/sdmmc.h index 79d6adc..f14d3e4 100644 --- a/sdmmc.h +++ b/sdmmc.h @@ -3,7 +3,7 @@ SD/MMC interface -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter 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 @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __SDMMC_H__ -#define __SDMMC_H__ 1 +#define __SDMMC_H__ #include "bsdtypes.h" #include "sdmmcchip.h" @@ -45,4 +45,6 @@ int sdmmc_check_card(struct device *dev); void sdmmc_ack_card(struct device *dev); int sdmmc_read(struct device *dev, u32 blk_start, u32 blk_count, void *data); void sdmmc_ipc(volatile ipc_request *req); + #endif + diff --git a/seeprom.c b/seeprom.c index f3f4437..6e5bc9f 100644 --- a/seeprom.c +++ b/seeprom.c @@ -3,7 +3,7 @@ SEEPROM support -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter 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 @@ -83,3 +83,4 @@ int seeprom_read(void *dst, int offset, int size) return size; } + diff --git a/seeprom.h b/seeprom.h index bb72921..a210c2b 100644 --- a/seeprom.h +++ b/seeprom.h @@ -3,7 +3,7 @@ SEEPROM support -Copyright (C) 2008, 2009 Sven Peter +Copyright (C) 2008, 2009 Sven Peter 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 @@ -20,8 +20,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __SEEPROM_H__ -#define __SEEPROM_H__ 1 +#define __SEEPROM_H__ int seeprom_read(void *dst, int offset, int size); #endif + diff --git a/start.S b/start.S index de1b026..a531d01 100644 --- a/start.S +++ b/start.S @@ -136,3 +136,4 @@ debug_output: bx lr .pool + diff --git a/start.h b/start.h index a8cf956..da5c84e 100644 --- a/start.h +++ b/start.h @@ -27,3 +27,4 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA void debug_output(u8 byte); #endif + diff --git a/string.c b/string.c index 9b21d3e..ffb6ca0 100644 --- a/string.c +++ b/string.c @@ -3,7 +3,6 @@ * * Copyright (C) 1991, 1992 Linus Torvalds */ - #include "string.h" size_t strnlen(const char *s, size_t count) @@ -112,3 +111,4 @@ char *strchr(const char *s, int c) } while(*s++ != 0); return NULL; } + diff --git a/string.h b/string.h index d016af4..82741c1 100644 --- a/string.h +++ b/string.h @@ -1,5 +1,10 @@ -#ifndef _STRING_H_ -#define _STRING_H_ +/* + * linux/lib/string.c + * + * Copyright (C) 1991, 1992 Linus Torvalds + */ +#ifndef __STRING_H__ +#define __STRING_H__ #include "types.h" @@ -15,3 +20,4 @@ void *memcpy(void *, const void *, size_t); int memcmp(const void *s1, const void *s2, size_t n); #endif + diff --git a/types.h b/types.h index 0456270..650e28b 100644 --- a/types.h +++ b/types.h @@ -17,8 +17,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -*/#ifndef __TYPES_H__ +*/ +#ifndef __TYPES_H__ #define __TYPES_H__ typedef unsigned char u8; @@ -68,3 +68,4 @@ typedef s32 size_t; #define ULLONG_MAX ((unsigned long long)0xffffffffffffffff) #endif + diff --git a/vsprintf.c b/vsprintf.c index a90e032..b2d18c8 100644 --- a/vsprintf.c +++ b/vsprintf.c @@ -717,3 +717,4 @@ int vsprintf(char *buf, const char *fmt, va_list args) { return vsnprintf(buf, INT_MAX, fmt, args); } + diff --git a/vsprintf.h b/vsprintf.h index e860c1c..0ce85ce 100644 --- a/vsprintf.h +++ b/vsprintf.h @@ -1,4 +1,10 @@ +#ifndef __VSPRINTF_H__ +#define __VSPRINTF_H__ + #include int vsprintf(char *buf, const char *fmt, va_list args); int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); + +#endif +