Mercurial > libdvdnav.hg
diff highlight.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/highlight.c Sun Aug 31 18:13:23 2008 +0000 +++ b/highlight.c Sat Sep 06 21:55:51 2008 +0000 @@ -1,18 +1,18 @@ -/* +/* * Copyright (C) 2000 Rich Wareham <richwareham@users.sourceforge.net> - * + * * This file is part of libdvdnav, a DVD navigation library. - * + * * 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 @@ -221,7 +221,7 @@ /* Simply return the appropriate value based on the SPRM */ if(((*button) = this->position_current.button) == -1) (*button) = this->vm->state.HL_BTNN_REG >> 10; - + return DVDNAV_STATUS_OK; } @@ -241,7 +241,7 @@ #ifdef BUTTON_TESTING nav_print_PCI(pci); #endif - + return &(pci->hli.btnit[button-1]); } @@ -253,7 +253,7 @@ dvdnav_status_t dvdnav_upper_button_select(dvdnav_t *this, pci_t *pci) { btni_t *button_ptr; - + if(!(button_ptr = get_current_button(this, pci))) return DVDNAV_STATUS_ERR; @@ -263,7 +263,7 @@ dvdnav_status_t dvdnav_lower_button_select(dvdnav_t *this, pci_t *pci) { btni_t *button_ptr; - + if(!(button_ptr = get_current_button(this, pci))) return DVDNAV_STATUS_ERR; @@ -273,7 +273,7 @@ dvdnav_status_t dvdnav_right_button_select(dvdnav_t *this, pci_t *pci) { btni_t *button_ptr; - + if(!(button_ptr = get_current_button(this, pci))) return DVDNAV_STATUS_ERR; @@ -283,7 +283,7 @@ dvdnav_status_t dvdnav_left_button_select(dvdnav_t *this, pci_t *pci) { btni_t *button_ptr; - + if(!(button_ptr = get_current_button(this, pci))) return DVDNAV_STATUS_ERR; @@ -291,14 +291,14 @@ return button_auto_action(this, pci); } -dvdnav_status_t dvdnav_get_highlight_area(pci_t *nav_pci , int32_t button, int32_t mode, +dvdnav_status_t dvdnav_get_highlight_area(pci_t *nav_pci , int32_t button, int32_t mode, dvdnav_highlight_area_t *highlight) { btni_t *button_ptr; #ifdef BUTTON_TESTING fprintf(MSG_OUT, "libdvdnav: Button get_highlight_area %i\n", button); #endif - + if(!nav_pci->hli.hl_gi.hli_ss) return DVDNAV_STATUS_ERR; if((button <= 0) || (button > nav_pci->hli.hl_gi.btn_ns)) @@ -341,7 +341,7 @@ printerr("This NAV has already been left."); return DVDNAV_STATUS_ERR; } - pthread_mutex_lock(&this->vm_lock); + pthread_mutex_lock(&this->vm_lock); button = this->vm->state.HL_BTNN_REG >> 10; @@ -366,10 +366,10 @@ printerr(""); return DVDNAV_STATUS_OK; } - pthread_mutex_unlock(&this->vm_lock); + pthread_mutex_unlock(&this->vm_lock); return DVDNAV_STATUS_ERR; } - + button_ptr = get_current_button(this, pci); /* Finally, make the VM execute the appropriate code and probably * scedule a jump */ @@ -382,8 +382,8 @@ this->position_current.still = 0; this->last_cmd_nav_lbn = pci->pci_gi.nv_pck_lbn; } - - pthread_mutex_unlock(&this->vm_lock); + + pthread_mutex_unlock(&this->vm_lock); return DVDNAV_STATUS_OK; } @@ -407,7 +407,7 @@ this->sync_wait = 0; pthread_mutex_unlock(&this->vm_lock); return DVDNAV_STATUS_OK; -} +} dvdnav_status_t dvdnav_button_select(dvdnav_t *this, pci_t *pci, int32_t button) { if(!pci->hli.hl_gi.hli_ss) { @@ -418,23 +418,23 @@ printerr("This NAV has already been left."); return DVDNAV_STATUS_ERR; } - + #ifdef BUTTON_TESTING - fprintf(MSG_OUT, "libdvdnav: Button select %i\n", button); + fprintf(MSG_OUT, "libdvdnav: Button select %i\n", button); #endif - + if((button <= 0) || (button > pci->hli.hl_gi.btn_ns)) { printerr("Button does not exist."); return DVDNAV_STATUS_ERR; } - + this->vm->state.HL_BTNN_REG = (button << 10); this->position_current.button = -1; /* Force Highligh change */ return DVDNAV_STATUS_OK; } -dvdnav_status_t dvdnav_button_select_and_activate(dvdnav_t *this, pci_t *pci, +dvdnav_status_t dvdnav_button_select_and_activate(dvdnav_t *this, pci_t *pci, int32_t button) { /* A trivial function */ if(dvdnav_button_select(this, pci, button) != DVDNAV_STATUS_ERR) @@ -460,7 +460,7 @@ best = 0; dist = 0x08000000; /* >> than (720*720)+(567*567); */ - + /* Loop through all buttons */ for(button = 1; button <= pci->hli.hl_gi.btn_ns; button++) { btni_t *button_ptr = &(pci->hli.btnit[button-1]);
