comparison settings.c @ 218:c2d0cf87a5ee src

Some fixes to that libdvdnav compiles under cygwin. Submitted by: Frantisek Dvorak <valtri@users.sourceforge.net>
author jcdutton
date Wed, 31 Dec 2003 21:37:16 +0000
parents b80dff4bef76
children 52877d182e96
comparison
equal deleted inserted replaced
217:eb503714e1c2 218:c2d0cf87a5ee
27 27
28 #include "dvdnav_internal.h" 28 #include "dvdnav_internal.h"
29 29
30 /* Characteristics/setting API calls */ 30 /* Characteristics/setting API calls */
31 31
32 dvdnav_status_t dvdnav_get_region_mask(dvdnav_t *this, int *region) { 32 dvdnav_status_t dvdnav_get_region_mask(dvdnav_t *this, int32_t *region) {
33 if(!this || !region) { 33 if(!this || !region) {
34 printerr("Passed a NULL this pointer."); 34 printerr("Passed a NULL this pointer.");
35 return DVDNAV_STATUS_ERR; 35 return DVDNAV_STATUS_ERR;
36 } 36 }
37 37
38 (*region) = this->vm->state.registers.SPRM[20]; 38 (*region) = this->vm->state.registers.SPRM[20];
39 return DVDNAV_STATUS_OK; 39 return DVDNAV_STATUS_OK;
40 } 40 }
41 41
42 dvdnav_status_t dvdnav_set_region_mask(dvdnav_t *this, int mask) { 42 dvdnav_status_t dvdnav_set_region_mask(dvdnav_t *this, int32_t mask) {
43 if(!this) { 43 if(!this) {
44 printerr("Passed a NULL this pointer."); 44 printerr("Passed a NULL this pointer.");
45 return DVDNAV_STATUS_ERR; 45 return DVDNAV_STATUS_ERR;
46 } 46 }
47 47
49 this->vm->state.registers.SPRM[20] = (mask & 0xff); 49 this->vm->state.registers.SPRM[20] = (mask & 0xff);
50 pthread_mutex_unlock(&this->vm_lock); 50 pthread_mutex_unlock(&this->vm_lock);
51 return DVDNAV_STATUS_OK; 51 return DVDNAV_STATUS_OK;
52 } 52 }
53 53
54 dvdnav_status_t dvdnav_set_readahead_flag(dvdnav_t *this, int use_readahead) { 54 dvdnav_status_t dvdnav_set_readahead_flag(dvdnav_t *this, int32_t use_readahead) {
55 if(!this) { 55 if(!this) {
56 printerr("Passed a NULL this pointer."); 56 printerr("Passed a NULL this pointer.");
57 return DVDNAV_STATUS_ERR; 57 return DVDNAV_STATUS_ERR;
58 } 58 }
59 59
60 this->use_read_ahead = use_readahead; 60 this->use_read_ahead = use_readahead;
61 return DVDNAV_STATUS_OK; 61 return DVDNAV_STATUS_OK;
62 } 62 }
63 63
64 dvdnav_status_t dvdnav_get_readahead_flag(dvdnav_t *this, int *flag) { 64 dvdnav_status_t dvdnav_get_readahead_flag(dvdnav_t *this, int32_t *flag) {
65 if(!this || !flag) { 65 if(!this || !flag) {
66 printerr("Passed a NULL this pointer."); 66 printerr("Passed a NULL this pointer.");
67 return DVDNAV_STATUS_ERR; 67 return DVDNAV_STATUS_ERR;
68 } 68 }
69 69
98 98
99 dvdnav_status_t dvdnav_spu_language_select(dvdnav_t *this, char *code) { 99 dvdnav_status_t dvdnav_spu_language_select(dvdnav_t *this, char *code) {
100 return set_language_register(this, code, 18); 100 return set_language_register(this, code, 18);
101 } 101 }
102 102
103 dvdnav_status_t dvdnav_set_PGC_positioning_flag(dvdnav_t *this, int pgc) { 103 dvdnav_status_t dvdnav_set_PGC_positioning_flag(dvdnav_t *this, int32_t pgc) {
104 if(!this) { 104 if(!this) {
105 printerr("Passed a NULL this pointer."); 105 printerr("Passed a NULL this pointer.");
106 return DVDNAV_STATUS_ERR; 106 return DVDNAV_STATUS_ERR;
107 } 107 }
108 108
109 this->pgc_based = pgc; 109 this->pgc_based = pgc;
110 return DVDNAV_STATUS_OK; 110 return DVDNAV_STATUS_OK;
111 } 111 }
112 112
113 dvdnav_status_t dvdnav_get_PGC_positioning_flag(dvdnav_t *this, int *flag) { 113 dvdnav_status_t dvdnav_get_PGC_positioning_flag(dvdnav_t *this, int32_t *flag) {
114 if(!this || !flag) { 114 if(!this || !flag) {
115 printerr("Passed a NULL this pointer."); 115 printerr("Passed a NULL this pointer.");
116 return DVDNAV_STATUS_ERR; 116 return DVDNAV_STATUS_ERR;
117 } 117 }
118 118