aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:31 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:31 -0700
commitb5718279c46003198d34c858405f0b34cc242e38 (patch)
tree632885bce08f970128180d3c31416c7802a391fc /com32/modules
parentc1ba76278c62b89b7d757cae139f38315943847b (diff)
downloadsyslinux.git-b5718279c46003198d34c858405f0b34cc242e38.tar.gz
syslinux.git-b5718279c46003198d34c858405f0b34cc242e38.tar.xz
syslinux.git-b5718279c46003198d34c858405f0b34cc242e38.zip
Run Nindent on com32/modules/vesainfo.c
Automatically reformat com32/modules/vesainfo.c 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 'com32/modules')
-rw-r--r--com32/modules/vesainfo.c93
1 files changed, 46 insertions, 47 deletions
diff --git a/com32/modules/vesainfo.c b/com32/modules/vesainfo.c
index a1f00299..00181e47 100644
--- a/com32/modules/vesainfo.c
+++ b/com32/modules/vesainfo.c
@@ -14,70 +14,69 @@
/* Wait for a keypress */
static void wait_key(void)
{
- char ch;
- while (fread(&ch, 1, 1, stdin) == 0)
- ;
+ char ch;
+ while (fread(&ch, 1, 1, stdin) == 0) ;
}
static void print_modes(void)
{
- static com32sys_t rm;
- struct vesa_general_info *gi;
- struct vesa_mode_info *mi;
- uint16_t mode, *mode_ptr;
- int lines;
+ static com32sys_t rm;
+ struct vesa_general_info *gi;
+ struct vesa_mode_info *mi;
+ uint16_t mode, *mode_ptr;
+ int lines;
- /* Allocate space in the bounce buffer for these structures */
- gi = &((struct vesa_info *)__com32.cs_bounce)->gi;
- mi = &((struct vesa_info *)__com32.cs_bounce)->mi;
+ /* Allocate space in the bounce buffer for these structures */
+ gi = &((struct vesa_info *)__com32.cs_bounce)->gi;
+ mi = &((struct vesa_info *)__com32.cs_bounce)->mi;
- gi->signature = VBE2_MAGIC; /* Get VBE2 extended data */
- rm.eax.w[0] = 0x4F00; /* Get SVGA general information */
- rm.edi.w[0] = OFFS(gi);
- rm.es = SEG(gi);
- __intcall(0x10, &rm, &rm);
+ gi->signature = VBE2_MAGIC; /* Get VBE2 extended data */
+ rm.eax.w[0] = 0x4F00; /* Get SVGA general information */
+ rm.edi.w[0] = OFFS(gi);
+ rm.es = SEG(gi);
+ __intcall(0x10, &rm, &rm);
- if ( rm.eax.w[0] != 0x004F ) {
- printf("No VESA BIOS detected\n");
- return;
- } else if ( gi->signature != VESA_MAGIC ) {
- printf("VESA information structure has bad magic, trying anyway...\n");
- }
+ if (rm.eax.w[0] != 0x004F) {
+ printf("No VESA BIOS detected\n");
+ return;
+ } else if (gi->signature != VESA_MAGIC) {
+ printf("VESA information structure has bad magic, trying anyway...\n");
+ }
- printf("VBE version %d.%d\n"
- "Mode attrib h_res v_res bpp layout rpos gpos bpos\n",
- (gi->version >> 8) & 0xff, gi->version & 0xff);
+ printf("VBE version %d.%d\n"
+ "Mode attrib h_res v_res bpp layout rpos gpos bpos\n",
+ (gi->version >> 8) & 0xff, gi->version & 0xff);
- lines = 1;
+ lines = 1;
- mode_ptr = GET_PTR(gi->video_mode_ptr);
+ mode_ptr = GET_PTR(gi->video_mode_ptr);
- while ((mode = *mode_ptr++) != 0xFFFF) {
- if (++lines >= 23) {
- wait_key();
- lines = 0;
- }
+ while ((mode = *mode_ptr++) != 0xFFFF) {
+ if (++lines >= 23) {
+ wait_key();
+ lines = 0;
+ }
- rm.eax.w[0] = 0x4F01; /* Get SVGA mode information */
- rm.ecx.w[0] = mode;
- rm.edi.w[0] = OFFS(mi);
- rm.es = SEG(mi);
- __intcall(0x10, &rm, &rm);
+ rm.eax.w[0] = 0x4F01; /* Get SVGA mode information */
+ rm.ecx.w[0] = mode;
+ rm.edi.w[0] = OFFS(mi);
+ rm.es = SEG(mi);
+ __intcall(0x10, &rm, &rm);
- /* Must be a supported mode */
- if ( rm.eax.w[0] != 0x004f )
- continue;
+ /* Must be a supported mode */
+ if (rm.eax.w[0] != 0x004f)
+ continue;
- printf("0x%04x 0x%04x %5u %5u %3u %6u %4u %4u %4u\n",
- mode, mi->mode_attr, mi->h_res, mi->v_res, mi->bpp,
- mi->memory_layout, mi->rpos, mi->gpos, mi->bpos);
- }
+ printf("0x%04x 0x%04x %5u %5u %3u %6u %4u %4u %4u\n",
+ mode, mi->mode_attr, mi->h_res, mi->v_res, mi->bpp,
+ mi->memory_layout, mi->rpos, mi->gpos, mi->bpos);
+ }
}
int main(void)
{
- openconsole(&dev_rawcon_r, &dev_stdcon_w);
+ openconsole(&dev_rawcon_r, &dev_stdcon_w);
- print_modes();
- return 0;
+ print_modes();
+ return 0;
}