Mercurial > libdvdnav.hg
diff vm/vmcmd.c @ 388:90ca650854e0 src
Remove all trailing whitespace,
patch by Erik Hovland *erik$hovland dot org%
author | rathann |
---|---|
date | Sat, 06 Sep 2008 21:55:51 +0000 |
parents | 579a3538d284 |
children | d3c273ced49c |
line wrap: on
line diff
--- a/vm/vmcmd.c Sun Aug 31 18:13:23 2008 +0000 +++ b/vm/vmcmd.c Sat Sep 06 21:55:51 2008 +0000 @@ -1,20 +1,20 @@ /* * Copyright (C) 2000, 2001 Martin Norbäck, Håkan Hjort * 2002-2004 the dvdnav project - * + * * This file is part of libdvdnav, a DVD navigation library. It is modified * from a file originally part of the Ogle DVD player. - * + * * libdvdnav 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. - * + * * libdvdnav 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 @@ -160,7 +160,7 @@ static void print_reg_or_data(command_t* command, int immediate, int start) { if(immediate) { uint32_t i = vm_getbits(command, start, 16); - + fprintf(MSG_OUT, "0x%x", i); if(isprint(i & 0xff) && isprint((i>>8) & 0xff)) fprintf(MSG_OUT, " (\"%c%c\")", (char)((i>>8) & 0xff), (char)(i & 0xff)); @@ -179,7 +179,7 @@ static void print_reg_or_data_3(command_t* command, int immediate, int start) { if(immediate) { uint32_t i = vm_getbits(command, start, 16); - + fprintf(MSG_OUT, "0x%x", i); if(isprint(i & 0xff) && isprint((i>>8) & 0xff)) fprintf(MSG_OUT, " (\"%c%c\")", (char)((i>>8) & 0xff), (char)(i & 0xff)); @@ -191,7 +191,7 @@ static void print_if_version_1(command_t* command) { uint8_t op = vm_getbits(command, 54, 3); - + if(op) { fprintf(MSG_OUT, "if ("); print_g_reg(vm_getbits(command,39,8)); @@ -203,7 +203,7 @@ static void print_if_version_2(command_t* command) { uint8_t op = vm_getbits(command, 54, 3); - + if(op) { fprintf(MSG_OUT, "if ("); print_reg(vm_getbits(command, 15, 8)); @@ -215,7 +215,7 @@ static void print_if_version_3(command_t* command) { uint8_t op = vm_getbits(command, 54, 3); - + if(op) { fprintf(MSG_OUT, "if ("); print_g_reg(vm_getbits(command, 43, 4)); @@ -240,7 +240,7 @@ static void print_if_version_5(command_t* command) { uint8_t op = vm_getbits(command, 54, 3); int set_immediate = vm_getbits(command, 60, 1); - + if(op) { if (set_immediate) { fprintf(MSG_OUT, "if ("); @@ -260,7 +260,7 @@ static void print_special_instruction(command_t* command) { uint8_t op = vm_getbits(command, 51, 4); - + switch(op) { case 0: /* NOP */ fprintf(MSG_OUT, "Nop"); @@ -272,11 +272,11 @@ fprintf(MSG_OUT, "Break"); break; case 3: /* Parental level */ - fprintf(MSG_OUT, "SetTmpPML %" PRIu8 ", Goto %" PRIu8, + fprintf(MSG_OUT, "SetTmpPML %" PRIu8 ", Goto %" PRIu8, vm_getbits(command, 11, 4), vm_getbits(command, 7, 8)); break; default: - fprintf(MSG_OUT, "WARNING: Unknown special instruction (%i)", + fprintf(MSG_OUT, "WARNING: Unknown special instruction (%i)", vm_getbits(command, 51, 4)); } } @@ -284,7 +284,7 @@ static void print_linksub_instruction(command_t* command) { uint32_t linkop = vm_getbits(command, 7, 8); uint32_t button = vm_getbits(command, 15, 6); - + if(linkop < sizeof(link_table)/sizeof(link_table[0])) fprintf(MSG_OUT, "%s (button %" PRIu8 ")", link_table[linkop], button); else @@ -293,10 +293,10 @@ static void print_link_instruction(command_t* command, int optional) { uint8_t op = vm_getbits(command, 51, 4); - + if(optional && op) fprintf(MSG_OUT, ", "); - + switch(op) { case 0: if(!optional) @@ -309,15 +309,15 @@ fprintf(MSG_OUT, "LinkPGCN %" PRIu16, vm_getbits(command, 14, 15)); break; case 5: - fprintf(MSG_OUT, "LinkPTT %" PRIu16 " (button %" PRIu8 ")", + fprintf(MSG_OUT, "LinkPTT %" PRIu16 " (button %" PRIu8 ")", vm_getbits(command, 9, 10), vm_getbits(command, 15, 6)); break; case 6: - fprintf(MSG_OUT, "LinkPGN %" PRIu8 " (button %" PRIu8 ")", + fprintf(MSG_OUT, "LinkPGN %" PRIu8 " (button %" PRIu8 ")", vm_getbits(command, 6, 7), vm_getbits(command, 15, 6)); break; case 7: - fprintf(MSG_OUT, "LinkCN %" PRIu8 " (button %" PRIu8 ")", + fprintf(MSG_OUT, "LinkCN %" PRIu8 " (button %" PRIu8 ")", vm_getbits(command, 7, 8), vm_getbits(command, 15, 6)); break; default: @@ -337,7 +337,7 @@ fprintf(MSG_OUT, "JumpVTS_TT %" PRIu8, vm_getbits(command, 22, 7)); break; case 5: - fprintf(MSG_OUT, "JumpVTS_PTT %" PRIu8 ":%" PRIu16, + fprintf(MSG_OUT, "JumpVTS_PTT %" PRIu8 ":%" PRIu16, vm_getbits(command, 22, 7), vm_getbits(command, 41, 10)); break; case 6: @@ -349,7 +349,7 @@ fprintf(MSG_OUT, "JumpSS VMGM (menu %" PRIu8 ")", vm_getbits(command, 19, 4)); break; case 2: - fprintf(MSG_OUT, "JumpSS VTSM (vts %" PRIu8 ", title %" PRIu8 + fprintf(MSG_OUT, "JumpSS VTSM (vts %" PRIu8 ", title %" PRIu8 ", menu %" PRIu8 ")", vm_getbits(command, 30, 7), vm_getbits(command, 38, 7), vm_getbits(command, 19, 4)); break; case 3: @@ -364,15 +364,15 @@ vm_getbits(command, 31, 8)); break; case 1: - fprintf(MSG_OUT, "CallSS VMGM (menu %" PRIu8 + fprintf(MSG_OUT, "CallSS VMGM (menu %" PRIu8 ", rsm_cell %" PRIu8 ")", vm_getbits(command, 19, 4), vm_getbits(command, 31, 8)); break; case 2: - fprintf(MSG_OUT, "CallSS VTSM (menu %" PRIu8 + fprintf(MSG_OUT, "CallSS VTSM (menu %" PRIu8 ", rsm_cell %" PRIu8 ")", vm_getbits(command, 19, 4), vm_getbits(command, 31, 8)); break; case 3: - fprintf(MSG_OUT, "CallSS VMGM (pgc %" PRIu8 ", rsm_cell %" PRIu8 ")", + fprintf(MSG_OUT, "CallSS VMGM (pgc %" PRIu8 ", rsm_cell %" PRIu8 ")", vm_getbits(command, 46, 15), vm_getbits(command, 31, 8)); break; } @@ -386,7 +386,7 @@ int i; /* FIXME: What about SPRM11 ? Karaoke */ /* Surely there must be some system set command for that ? */ - + switch(vm_getbits(command, 59, 4)) { case 1: /* Set system reg 1 &| 2 &| 3 (Audio, Subp. Angle) */ for(i = 1; i <= 3; i++) { @@ -424,14 +424,14 @@ fprintf(MSG_OUT, " = g[%" PRIu8 "]", vm_getbits(command, 19, 4)); break; default: - fprintf(MSG_OUT, "WARNING: Unknown system set instruction (%i)", + fprintf(MSG_OUT, "WARNING: Unknown system set instruction (%i)", vm_getbits(command, 59, 4)); } } static void print_set_version_1(command_t* command) { uint8_t set_op = vm_getbits(command, 59, 4); - + if(set_op) { print_g_reg(vm_getbits(command, 35, 4)); print_set_op(set_op); @@ -443,7 +443,7 @@ static void print_set_version_2(command_t* command) { uint8_t set_op = vm_getbits(command, 59, 4); - + if(set_op) { print_g_reg(vm_getbits(command, 51, 4)); print_set_op(set_op); @@ -455,7 +455,7 @@ static void print_set_version_3(command_t* command) { uint8_t set_op = vm_getbits(command, 59, 4); - + if(set_op) { print_g_reg(vm_getbits(command, 51, 4)); print_set_op(set_op); @@ -476,7 +476,7 @@ ( (uint64_t) vm_command->bytes[5] << 16 ) | ( (uint64_t) vm_command->bytes[6] << 8 ) | (uint64_t) vm_command->bytes[7] ; - command.examined = 0; + command.examined = 0; switch(vm_getbits(&command,63,3)) { /* three first bits */ case 0: /* Special instructions */ @@ -527,7 +527,7 @@ fprintf(MSG_OUT, "WARNING: Unknown instruction type (%i)", vm_getbits(&command, 63, 3)); } /* Check if there still are bits set that were not examined */ - + if(command.instruction & ~ command.examined) { fprintf(MSG_OUT, " libdvdnav: vmcmd.c: [WARNING, unknown bits:"); fprintf(MSG_OUT, " %08"PRIx64, (command.instruction & ~ command.examined) );