aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:35 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:35 -0700
commit51788c891d17224c10c620e8e2085717f95bef73 (patch)
tree4d0876731400516f55f7aa875ce3474c767a7944 /memdisk
parentb1cf490237cc9ee1dd0bdf8643e6152a16fecc07 (diff)
downloadsyslinux.git-51788c891d17224c10c620e8e2085717f95bef73.tar.gz
syslinux.git-51788c891d17224c10c620e8e2085717f95bef73.tar.xz
syslinux.git-51788c891d17224c10c620e8e2085717f95bef73.zip
Run Nindent on memdisk/memdisk.h
Automatically reformat memdisk/memdisk.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/memdisk.h51
1 files changed, 24 insertions, 27 deletions
diff --git a/memdisk/memdisk.h b/memdisk/memdisk.h
index 9d4a4297..1ab2c000 100644
--- a/memdisk/memdisk.h
+++ b/memdisk/memdisk.h
@@ -29,12 +29,12 @@
#define __cdecl __attribute__((cdecl,regparm(0)))
-typedef void (*syscall_t)(uint8_t, com32sys_t *, com32sys_t *);
+typedef void (*syscall_t) (uint8_t, com32sys_t *, com32sys_t *);
extern __cdecl syscall_t syscall;
extern void *sys_bounce;
/* What to call when we're dead */
-extern void __attribute__((noreturn)) die(void);
+extern void __attribute__ ((noreturn)) die(void);
/* Standard routines */
#define memcpy(a,b,c) __builtin_memcpy(a,b,c)
@@ -43,46 +43,43 @@ extern void __attribute__((noreturn)) die(void);
static inline size_t strlen(const char *__a)
{
- const char *__D;
- size_t __c;
+ const char *__D;
+ size_t __c;
- asm("repne;scasb"
- : "=D" (__D), "=c" (__c)
- : "D" (__a), "c" (-1), "a" (0), "m" (*__a));
+asm("repne;scasb":"=D"(__D), "=c"(__c)
+: "D"(__a), "c"(-1), "a"(0), "m"(*__a));
- return __D - __a - 1;
+ return __D - __a - 1;
}
/* memcpy() but returns a pointer to end of buffer */
-static inline void *
-mempcpy(void *__d, const void *__s, unsigned int __n)
+static inline void *mempcpy(void *__d, const void *__s, unsigned int __n)
{
- memcpy(__d, __s, __n);
- return (void *)((char *)__d + __n);
+ memcpy(__d, __s, __n);
+ return (void *)((char *)__d + __n);
}
/* memcmp() */
-static inline int
-memcmp(const void *__a, const void *__b, unsigned int __n)
+static inline int memcmp(const void *__a, const void *__b, unsigned int __n)
{
- const unsigned char *__aa = __a;
- const unsigned char *__bb = __b;
- int __d;
+ const unsigned char *__aa = __a;
+ const unsigned char *__bb = __b;
+ int __d;
- while ( __n-- ) {
- __d = *__bb++ - *__aa++;
- if ( __d )
- return __d;
- }
+ while (__n--) {
+ __d = *__bb++ - *__aa++;
+ if (__d)
+ return __d;
+ }
- return 0;
+ return 0;
}
/* Decompression */
-extern int check_zip(void *indata, uint32_t size, uint32_t *zbytes_p,
- uint32_t *dbytes_p, uint32_t *orig_crc,
- uint32_t *offset_p);
+extern int check_zip(void *indata, uint32_t size, uint32_t * zbytes_p,
+ uint32_t * dbytes_p, uint32_t * orig_crc,
+ uint32_t * offset_p);
extern void *unzip(void *indata, uint32_t zbytes, uint32_t dbytes,
- uint32_t orig_crc, void *target);
+ uint32_t orig_crc, void *target);
#endif