* applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+202
-6
@@ -1170,25 +1170,221 @@ if $(HAIKU_GCC_VERSION[1]) = 2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $(HAIKU_NO_WERROR) != 1 {
|
if $(HAIKU_NO_WERROR) != 1 {
|
||||||
|
EnableWerror src add-ons accelerants 3dfx ;
|
||||||
|
EnableWerror src add-ons accelerants ati ;
|
||||||
|
EnableWerror src add-ons accelerants common ;
|
||||||
|
EnableWerror src add-ons accelerants et6x00 ;
|
||||||
|
# EnableWerror src add-ons accelerants intel_extreme ;
|
||||||
|
# EnableWerror src add-ons accelerants matrox ;
|
||||||
|
EnableWerror src add-ons accelerants neomagic ;
|
||||||
|
# EnableWerror src add-ons accelerants nvidia ;
|
||||||
|
EnableWerror src add-ons accelerants nvidia_gpgpu ;
|
||||||
|
# EnableWerror src add-ons accelerants radeon ;
|
||||||
|
EnableWerror src add-ons accelerants radeon_hd ;
|
||||||
|
EnableWerror src add-ons accelerants s3 ;
|
||||||
|
EnableWerror src add-ons accelerants skeleton ;
|
||||||
|
EnableWerror src add-ons accelerants vesa ;
|
||||||
|
EnableWerror src add-ons accelerants via ;
|
||||||
|
EnableWerror src add-ons accelerants vmware ;
|
||||||
|
EnableWerror src add-ons bluetooth ;
|
||||||
|
EnableWerror src add-ons decorators ;
|
||||||
|
EnableWerror src add-ons disk_systems ;
|
||||||
|
EnableWerror src add-ons input_server devices ;
|
||||||
|
# EnableWerror src add-ons input_server filters ;
|
||||||
|
# EnableWerror src add-ons input_server methods ;
|
||||||
|
# EnableWerror src add-ons kernel bus_managers acpi ;
|
||||||
|
EnableWerror src add-ons kernel bus_managers agp_gart ;
|
||||||
|
EnableWerror src add-ons kernel bus_managers ata ;
|
||||||
|
EnableWerror src add-ons kernel bus_managers config_manager ;
|
||||||
|
EnableWerror src add-ons kernel bus_managers firewire ;
|
||||||
|
EnableWerror src add-ons kernel bus_managers isa ;
|
||||||
|
EnableWerror src add-ons kernel bus_managers pci ;
|
||||||
|
# EnableWerror src add-ons kernel bus_managers ps2 ; # gcc2
|
||||||
|
EnableWerror src add-ons kernel bus_managers scsi ;
|
||||||
|
EnableWerror src add-ons kernel bus_managers usb ;
|
||||||
|
EnableWerror src add-ons kernel busses agp_gart ;
|
||||||
|
EnableWerror src add-ons kernel busses ata ;
|
||||||
|
EnableWerror src add-ons kernel busses scsi ;
|
||||||
|
EnableWerror src add-ons kernel busses usb ;
|
||||||
|
EnableWerror src add-ons kernel console ;
|
||||||
|
EnableWerror src add-ons kernel cpu ;
|
||||||
|
# EnableWerror src add-ons kernel debugger ; # gcc2
|
||||||
|
# EnableWerror src add-ons kernel drivers audio ;
|
||||||
|
EnableWerror src add-ons kernel drivers bluetooth ;
|
||||||
|
EnableWerror src add-ons kernel drivers bus ;
|
||||||
|
EnableWerror src add-ons kernel drivers common ;
|
||||||
|
EnableWerror src add-ons kernel drivers disk ;
|
||||||
|
EnableWerror src add-ons kernel drivers dvb ;
|
||||||
|
# EnableWerror src add-ons kernel drivers graphics ;
|
||||||
|
# EnableWerror src add-ons kernel drivers input ;
|
||||||
|
EnableWerror src add-ons kernel drivers joystick ;
|
||||||
|
EnableWerror src add-ons kernel drivers midi ;
|
||||||
|
EnableWerror src add-ons kernel drivers misc ;
|
||||||
|
# EnableWerror src add-ons kernel drivers network ;
|
||||||
|
EnableWerror src add-ons kernel drivers ports ;
|
||||||
|
# EnableWerror src add-ons kernel drivers power ;
|
||||||
|
EnableWerror src add-ons kernel drivers printer ;
|
||||||
|
EnableWerror src add-ons kernel drivers random ;
|
||||||
|
EnableWerror src add-ons kernel drivers tty ;
|
||||||
|
EnableWerror src add-ons kernel drivers video ;
|
||||||
EnableWerror src add-ons kernel file_systems bfs ;
|
EnableWerror src add-ons kernel file_systems bfs ;
|
||||||
|
EnableWerror src add-ons kernel file_systems cdda ;
|
||||||
|
# EnableWerror src add-ons kernel file_systems ext2 ;
|
||||||
|
# EnableWerror src add-ons kernel file_systems fat ;
|
||||||
|
# EnableWerror src add-ons kernel file_systems googlefs ;
|
||||||
|
EnableWerror src add-ons kernel file_systems iso9660 ;
|
||||||
|
EnableWerror src add-ons kernel file_systems layers ;
|
||||||
|
EnableWerror src add-ons kernel file_systems netfs ;
|
||||||
|
EnableWerror src add-ons kernel file_systems nfs ;
|
||||||
|
# EnableWerror src add-ons kernel file_systems ntfs ;
|
||||||
EnableWerror src add-ons kernel file_systems packagefs ;
|
EnableWerror src add-ons kernel file_systems packagefs ;
|
||||||
|
EnableWerror src add-ons kernel file_systems ramfs ;
|
||||||
|
# EnableWerror src add-ons kernel file_systems reiserfs ;
|
||||||
|
EnableWerror src add-ons kernel file_systems udf ;
|
||||||
EnableWerror src add-ons kernel file_systems userlandfs ;
|
EnableWerror src add-ons kernel file_systems userlandfs ;
|
||||||
|
EnableWerror src add-ons kernel generic ;
|
||||||
|
EnableWerror src add-ons kernel network atalink_protocols ;
|
||||||
|
EnableWerror src add-ons kernel network devices ;
|
||||||
|
EnableWerror src add-ons kernel network notifications ;
|
||||||
|
EnableWerror src add-ons kernel network ppp ;
|
||||||
|
# EnableWerror src add-ons kernel network protocols ;
|
||||||
|
# EnableWerror src add-ons kernel network stack ;
|
||||||
|
EnableWerror src add-ons kernel partitioning_systems ;
|
||||||
|
EnableWerror src add-ons locale ;
|
||||||
|
EnableWerror src add-ons mail_daemon ;
|
||||||
|
EnableWerror src add-ons media media-add-ons demultiplexer ;
|
||||||
|
EnableWerror src add-ons media media-add-ons dvb ;
|
||||||
|
EnableWerror src add-ons media media-add-ons esound_sink ;
|
||||||
|
EnableWerror src add-ons media media-add-ons finepix_webcam ;
|
||||||
|
EnableWerror src add-ons media media-add-ons firewire_dv ;
|
||||||
|
EnableWerror src add-ons media media-add-ons legacy ;
|
||||||
|
EnableWerror src add-ons media media-add-ons mixer ;
|
||||||
|
EnableWerror src add-ons media media-add-ons multi_audio ;
|
||||||
|
EnableWerror src add-ons media media-add-ons opensound ;
|
||||||
|
EnableWerror src add-ons media media-add-ons radeon ;
|
||||||
|
EnableWerror src add-ons media media-add-ons reader ;
|
||||||
|
EnableWerror src add-ons media media-add-ons tone_producer_demo ;
|
||||||
|
EnableWerror src add-ons media media-add-ons usb_vision ;
|
||||||
|
# EnableWerror src add-ons media media-add-ons usb_webcam ;
|
||||||
|
EnableWerror src add-ons media media-add-ons video_mixer ;
|
||||||
|
# EnableWerror src add-ons media media-add-ons video_producer_demo ;
|
||||||
|
EnableWerror src add-ons media media-add-ons videowindow ;
|
||||||
|
EnableWerror src add-ons media media-add-ons writer ;
|
||||||
|
EnableWerror src add-ons media plugins ac3_decoder ;
|
||||||
|
EnableWerror src add-ons media plugins aiff_reader ;
|
||||||
|
EnableWerror src add-ons media plugins ape_reader ;
|
||||||
|
# EnableWerror src add-ons media plugins asf_reader ;
|
||||||
|
EnableWerror src add-ons media plugins au_reader ;
|
||||||
|
# EnableWerror src add-ons media plugins avi_reader ;
|
||||||
|
# EnableWerror src add-ons media plugins ffmpeg ;
|
||||||
|
# EnableWerror src add-ons media plugins matroska ;
|
||||||
|
# EnableWerror src add-ons media plugins mov_reader ;
|
||||||
|
EnableWerror src add-ons media plugins mp3_decoder ;
|
||||||
|
# EnableWerror src add-ons media plugins mp3_reader ;
|
||||||
|
EnableWerror src add-ons media plugins mp4_reader ;
|
||||||
|
EnableWerror src add-ons media plugins musepack ;
|
||||||
|
# EnableWerror src add-ons media plugins ogg ;
|
||||||
|
# EnableWerror src add-ons media plugins raw_decoder ;
|
||||||
|
# EnableWerror src add-ons media plugins speex ;
|
||||||
|
EnableWerror src add-ons media plugins theora ;
|
||||||
|
EnableWerror src add-ons media plugins vorbis ;
|
||||||
|
# EnableWerror src add-ons media plugins wav_reader ;
|
||||||
|
EnableWerror src add-ons media plugins xvid_decoder ;
|
||||||
|
EnableWerror src add-ons opengl ;
|
||||||
|
EnableWerror src add-ons print ;
|
||||||
|
EnableWerror src add-ons screen_savers ;
|
||||||
|
EnableWerror src add-ons tracker ;
|
||||||
|
EnableWerror src add-ons translators bmp ;
|
||||||
|
# EnableWerror src add-ons translators exr ;
|
||||||
|
EnableWerror src add-ons translators gif ;
|
||||||
|
EnableWerror src add-ons translators hpgs ;
|
||||||
|
EnableWerror src add-ons translators hvif ;
|
||||||
|
EnableWerror src add-ons translators ico ;
|
||||||
|
# EnableWerror src add-ons translators jpeg ; # gcc2
|
||||||
|
EnableWerror src add-ons translators jpeg2000 ;
|
||||||
|
EnableWerror src add-ons translators pcx ;
|
||||||
|
# EnableWerror src add-ons translators png ; # gcc2
|
||||||
|
EnableWerror src add-ons translators ppm ;
|
||||||
|
EnableWerror src add-ons translators raw ;
|
||||||
|
EnableWerror src add-ons translators rtf ;
|
||||||
|
EnableWerror src add-ons translators sgi ;
|
||||||
|
EnableWerror src add-ons translators shared ;
|
||||||
|
EnableWerror src add-ons translators stxt ;
|
||||||
|
EnableWerror src add-ons translators tga ;
|
||||||
|
EnableWerror src add-ons translators tiff ;
|
||||||
|
# EnableWerror src add-ons translators wonderbrush ;
|
||||||
|
# EnableWerror src add-ons print ;
|
||||||
EnableWerror src bin package ;
|
EnableWerror src bin package ;
|
||||||
|
EnableWerror src apps aboutsystem ;
|
||||||
|
EnableWerror src apps activitymonitor ;
|
||||||
|
EnableWerror src apps bootman ;
|
||||||
|
EnableWerror src apps bsnow ;
|
||||||
|
EnableWerror src apps cdplayer ;
|
||||||
|
# EnableWerror src apps charactermap ;
|
||||||
|
EnableWerror src apps clock ;
|
||||||
|
EnableWerror src apps codycam ;
|
||||||
|
EnableWerror src apps cortex ;
|
||||||
|
EnableWerror src apps deskbar ;
|
||||||
|
EnableWerror src apps deskcalc ;
|
||||||
|
EnableWerror src apps devices ;
|
||||||
|
EnableWerror src apps diskprobe ;
|
||||||
|
# EnableWerror src apps diskusage ;
|
||||||
|
EnableWerror src apps drivesetup ;
|
||||||
|
EnableWerror src apps expander ;
|
||||||
|
EnableWerror src apps fontdemo ;
|
||||||
|
EnableWerror src apps glteapot ;
|
||||||
|
EnableWerror src apps haiku3d ;
|
||||||
|
# EnableWerror src apps icon-o-matic ;
|
||||||
|
EnableWerror src apps installer ;
|
||||||
|
EnableWerror src apps launchbox ;
|
||||||
|
EnableWerror src apps magnify ;
|
||||||
|
# EnableWerror src apps mail ;
|
||||||
|
EnableWerror src apps mandelbrot ;
|
||||||
|
EnableWerror src apps mediaconverter ;
|
||||||
|
# EnableWerror src apps mediaplayer ;
|
||||||
|
EnableWerror src apps midiplayer ;
|
||||||
|
EnableWerror src apps networkstatus ;
|
||||||
|
EnableWerror src apps packageinstaller ;
|
||||||
|
EnableWerror src apps pairs ;
|
||||||
|
EnableWerror src apps people ;
|
||||||
|
# EnableWerror src apps poorman ;
|
||||||
|
EnableWerror src apps powerstatus ;
|
||||||
|
EnableWerror src apps processcontroller ;
|
||||||
|
EnableWerror src apps pulse ;
|
||||||
|
EnableWerror src apps readonlybootprompt ;
|
||||||
|
EnableWerror src apps screenshot ;
|
||||||
|
EnableWerror src apps showimage ;
|
||||||
|
EnableWerror src apps soundrecorder ;
|
||||||
|
EnableWerror src apps stylededit ;
|
||||||
|
EnableWerror src apps sudoku ;
|
||||||
|
EnableWerror src apps terminal ;
|
||||||
|
EnableWerror src apps text_search ;
|
||||||
|
EnableWerror src apps tracker ;
|
||||||
|
EnableWerror src apps tv ;
|
||||||
|
EnableWerror src apps workspaces ;
|
||||||
EnableWerror src kits app ;
|
EnableWerror src kits app ;
|
||||||
|
EnableWerror src kits bluetooth ;
|
||||||
|
EnableWerror src kits debug ;
|
||||||
EnableWerror src kits device ;
|
EnableWerror src kits device ;
|
||||||
|
EnableWerror src kits game ;
|
||||||
EnableWerror src kits interface ;
|
EnableWerror src kits interface ;
|
||||||
|
# EnableWerror src kits locale ;
|
||||||
|
EnableWerror src kits mail ;
|
||||||
|
# EnableWerror src kits media ; # gcc2
|
||||||
EnableWerror src kits midi ;
|
EnableWerror src kits midi ;
|
||||||
EnableWerror src kits midi2 ;
|
EnableWerror src kits midi2 ;
|
||||||
|
EnableWerror src kits network ;
|
||||||
|
EnableWerror src kits notification ;
|
||||||
|
EnableWerror src kits opengl ;
|
||||||
EnableWerror src kits print ;
|
EnableWerror src kits print ;
|
||||||
|
EnableWerror src kits screensaver ;
|
||||||
|
EnableWerror src kits shared ;
|
||||||
EnableWerror src kits storage ;
|
EnableWerror src kits storage ;
|
||||||
EnableWerror src kits support ;
|
EnableWerror src kits support ;
|
||||||
|
EnableWerror src kits textencoding ;
|
||||||
|
# EnableWerror src kits tracker ;
|
||||||
EnableWerror src kits translation ;
|
EnableWerror src kits translation ;
|
||||||
EnableWerror src servers cddb_daemon ;
|
EnableWerror src servers ;
|
||||||
EnableWerror src servers debug ;
|
|
||||||
EnableWerror src servers input ;
|
|
||||||
EnableWerror src servers midi ;
|
|
||||||
EnableWerror src servers print ;
|
|
||||||
EnableWerror src servers registrar ;
|
|
||||||
EnableWerror src system kernel ;
|
EnableWerror src system kernel ;
|
||||||
EnableWerror src system runtime_loader ;
|
EnableWerror src system runtime_loader ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ typedef struct config_manager_for_driver_module_info {
|
|||||||
uint32 len);
|
uint32 len);
|
||||||
} config_manager_for_driver_module_info;
|
} config_manager_for_driver_module_info;
|
||||||
|
|
||||||
|
int config_manager_scan_hardcoded(struct device_info **info, int32 *count);
|
||||||
|
|
||||||
#define B_CONFIG_MANAGER_FOR_DRIVER_MODULE_NAME "bus_managers/config_manager/driver/v1"
|
#define B_CONFIG_MANAGER_FOR_DRIVER_MODULE_NAME "bus_managers/config_manager/driver/v1"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ typedef struct {
|
|||||||
G400MAX,
|
G400MAX,
|
||||||
G450,
|
G450,
|
||||||
G550
|
G550
|
||||||
};
|
} card_type;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/* specialised registers for card initialisation read from MGA BIOS (pins) */
|
/* specialised registers for card initialisation read from MGA BIOS (pins) */
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ typedef struct {
|
|||||||
NM2230,
|
NM2230,
|
||||||
NM2360,
|
NM2360,
|
||||||
NM2380
|
NM2380
|
||||||
};
|
} card_type;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/* specialised registers for predefined cardspecs */
|
/* specialised registers for predefined cardspecs */
|
||||||
|
|||||||
@@ -72,13 +72,13 @@ Rage128_SetDPMSMode(uint32 dpmsMode)
|
|||||||
case B_DPMS_STAND_BY:
|
case B_DPMS_STAND_BY:
|
||||||
// Screen: Off; HSync: Off, VSync: On.
|
// Screen: Off; HSync: Off, VSync: On.
|
||||||
OUTREGM(R128_CRTC_EXT_CNTL,
|
OUTREGM(R128_CRTC_EXT_CNTL,
|
||||||
R128_CRTC_DISPLAY_DIS | R128_CRTC_HSYNC_DIS, mask);
|
(R128_CRTC_DISPLAY_DIS | R128_CRTC_HSYNC_DIS), mask);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_DPMS_SUSPEND:
|
case B_DPMS_SUSPEND:
|
||||||
// Screen: Off; HSync: On, VSync: Off.
|
// Screen: Off; HSync: On, VSync: Off.
|
||||||
OUTREGM(R128_CRTC_EXT_CNTL,
|
OUTREGM(R128_CRTC_EXT_CNTL,
|
||||||
R128_CRTC_DISPLAY_DIS | R128_CRTC_VSYNC_DIS, mask);
|
(R128_CRTC_DISPLAY_DIS | R128_CRTC_VSYNC_DIS), mask);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_DPMS_OFF:
|
case B_DPMS_OFF:
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
// Memory Specifications from RAGE 128 Software Development Manual
|
// Memory Specifications from RAGE 128 Software Development Manual
|
||||||
// (Technical Reference Manual P/N SDK-G04000 Rev 0.01), page 3-21.
|
// (Technical Reference Manual P/N SDK-G04000 Rev 0.01), page 3-21.
|
||||||
static R128_RAMSpec sRAMSpecs[] = {
|
static R128_RAMSpec sRAMSpecs[] = {
|
||||||
{ 4, 4, 3, 3, 1, 3, 1, 16, 12, "128-bit SDR SGRAM 1:1" },
|
{ 4, 4, 3, 3, 1, 3, 1, 16, 12, (char *)"128-bit SDR SGRAM 1:1" },
|
||||||
{ 4, 8, 3, 3, 1, 3, 1, 17, 13, "64-bit SDR SGRAM 1:1" },
|
{ 4, 8, 3, 3, 1, 3, 1, 17, 13, (char *)"64-bit SDR SGRAM 1:1" },
|
||||||
{ 4, 4, 1, 2, 1, 2, 1, 16, 12, "64-bit SDR SGRAM 2:1" },
|
{ 4, 4, 1, 2, 1, 2, 1, 16, 12, (char *)"64-bit SDR SGRAM 2:1" },
|
||||||
{ 4, 4, 3, 3, 2, 3, 1, 16, 12, "64-bit DDR SGRAM" },
|
{ 4, 4, 3, 3, 2, 3, 1, 16, 12, (char *)"64-bit DDR SGRAM" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ SetRegisters(DisplayParams& params)
|
|||||||
|
|
||||||
OUTREG(R128_CRTC_GEN_CNTL, params.crtc_gen_cntl);
|
OUTREG(R128_CRTC_GEN_CNTL, params.crtc_gen_cntl);
|
||||||
|
|
||||||
OUTREGM(R128_DAC_CNTL, R128_DAC_MASK_ALL | R128_DAC_8BIT_EN,
|
OUTREGM(R128_DAC_CNTL, (R128_DAC_MASK_ALL | R128_DAC_8BIT_EN),
|
||||||
~(R128_DAC_RANGE_CNTL | R128_DAC_BLANKING));
|
~(R128_DAC_RANGE_CNTL | R128_DAC_BLANKING));
|
||||||
|
|
||||||
OUTREG(R128_CRTC_H_TOTAL_DISP, params.crtc_h_total_disp);
|
OUTREG(R128_CRTC_H_TOTAL_DISP, params.crtc_h_total_disp);
|
||||||
@@ -393,7 +393,7 @@ Rage128_SetDisplayMode(const DisplayModeEx& mode)
|
|||||||
|
|
||||||
// Select primary monitor and enable 8-bit color.
|
// Select primary monitor and enable 8-bit color.
|
||||||
OUTREGM(R128_DAC_CNTL, R128_DAC_8BIT_EN,
|
OUTREGM(R128_DAC_CNTL, R128_DAC_8BIT_EN,
|
||||||
R128_DAC_PALETTE_ACC_CTL | R128_DAC_8BIT_EN);
|
(R128_DAC_PALETTE_ACC_CTL | R128_DAC_8BIT_EN));
|
||||||
OUTREG8(R128_PALETTE_INDEX, 0); // set first color index
|
OUTREG8(R128_PALETTE_INDEX, 0); // set first color index
|
||||||
|
|
||||||
for (int i = 0; i < 256; i++)
|
for (int i = 0; i < 256; i++)
|
||||||
@@ -436,7 +436,7 @@ Rage128_SetIndexedColors(uint count, uint8 first, uint8* colorData, uint32 flags
|
|||||||
|
|
||||||
// Select primary monitor and enable 8-bit color.
|
// Select primary monitor and enable 8-bit color.
|
||||||
OUTREGM(R128_DAC_CNTL, R128_DAC_8BIT_EN,
|
OUTREGM(R128_DAC_CNTL, R128_DAC_8BIT_EN,
|
||||||
R128_DAC_PALETTE_ACC_CTL | R128_DAC_8BIT_EN);
|
(R128_DAC_PALETTE_ACC_CTL | R128_DAC_8BIT_EN));
|
||||||
OUTREG8(R128_PALETTE_INDEX, first); // set first color index
|
OUTREG8(R128_PALETTE_INDEX, first); // set first color index
|
||||||
|
|
||||||
while (count--) {
|
while (count--) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#define GLOBALDATA_H
|
#define GLOBALDATA_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include "DriverInterface.h"
|
#include "DriverInterface.h"
|
||||||
#include "nm_globals.h"
|
#include "nm_globals.h"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#define GLOBALDATA_H
|
#define GLOBALDATA_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
/* DDC/EDID library */
|
/* DDC/EDID library */
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ Savage_GetPanelInfo()
|
|||||||
if (panelX == 1408)
|
if (panelX == 1408)
|
||||||
panelX = 1400;
|
panelX = 1400;
|
||||||
|
|
||||||
char* sTechnology;
|
const char* sTechnology;
|
||||||
|
|
||||||
if ((ReadSeqReg(0x39) & 0x03) == 0)
|
if ((ReadSeqReg(0x39) & 0x03) == 0)
|
||||||
sTechnology = "TFT";
|
sTechnology = "TFT";
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ MasterServerDevice::~MasterServerDevice()
|
|||||||
status_t
|
status_t
|
||||||
MasterServerDevice::InitCheck()
|
MasterServerDevice::InitCheck()
|
||||||
{
|
{
|
||||||
input_device_ref device = { "Wacom Tablets",
|
input_device_ref device = { (char *)"Wacom Tablets",
|
||||||
B_POINTING_DEVICE, (void*)this };
|
B_POINTING_DEVICE, (void*)this };
|
||||||
input_device_ref* deviceList[2] = { &device, NULL };
|
input_device_ref* deviceList[2] = { &device, NULL };
|
||||||
RegisterDevices(deviceList);
|
RegisterDevices(deviceList);
|
||||||
|
|||||||
@@ -589,10 +589,10 @@ KeyStrokeSequenceCommandActuator::KeyStrokeSequenceCommandActuator(int32 argc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If we have a letter, try to make it the correct case
|
// If we have a letter, try to make it the correct case
|
||||||
if ((unicodeVal >= 'A') && (unicodeVal <= 'Z'))
|
if ((unicodeVal >= 'A') && (unicodeVal <= 'Z')) {
|
||||||
if ((customMods &B_SHIFT_KEY) == 0)
|
if ((customMods &B_SHIFT_KEY) == 0)
|
||||||
unicodeVal += 'a'-'A';
|
unicodeVal += 'a'-'A';
|
||||||
else if ((unicodeVal >= 'a') && (unicodeVal <= 'z'))
|
} else if ((unicodeVal >= 'a') && (unicodeVal <= 'z'))
|
||||||
if ((customMods &B_SHIFT_KEY) != 0)
|
if ((customMods &B_SHIFT_KEY) != 0)
|
||||||
unicodeVal -= 'a'-'A';
|
unicodeVal -= 'a'-'A';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
/* $Id: RK.h 10527 2004-12-23 22:08:39Z korli $ */
|
/* $Id: RK.h 10527 2004-12-23 22:08:39Z korli $ */
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/* THIS SOURCE CODE IS MODIFIED FOR TKO BY T.MURAI 1997
|
/* THIS SOURCE CODE IS MODIFIED FOR TKO BY T.MURAI 1997 */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
#ifndef _RK_h
|
#ifndef _RK_h
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/* THIS SOURCE CODE IS MODIFIED FOR TKO BY T.MURAI 1997
|
/* THIS SOURCE CODE IS MODIFIED FOR TKO BY T.MURAI 1997 */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
/* LINTLIBRARY */
|
/* LINTLIBRARY */
|
||||||
/* $Id: RKintern.h 10525 2004-12-23 21:23:50Z korli $ */
|
/* $Id: RKintern.h 10525 2004-12-23 21:23:50Z korli $ */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/* THIS SOURCE CODE IS MODIFIED FOR kanBe BY T.MURAI 1997
|
/* THIS SOURCE CODE IS MODIFIED FOR kanBe BY T.MURAI 1997 */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
#ifndef _RKintern_h
|
#ifndef _RKintern_h
|
||||||
#define _RKintern_h
|
#define _RKintern_h
|
||||||
|
|||||||
@@ -1096,7 +1096,6 @@ static struct fw_xfer *
|
|||||||
fw_tl2xfer(struct firewire_comm *fc, int node, int tlabel, int tcode)
|
fw_tl2xfer(struct firewire_comm *fc, int node, int tlabel, int tcode)
|
||||||
{
|
{
|
||||||
struct fw_xfer *xfer;
|
struct fw_xfer *xfer;
|
||||||
int s = splfw();
|
|
||||||
int req;
|
int req;
|
||||||
|
|
||||||
mtx_lock(&fc->tlabel_lock);
|
mtx_lock(&fc->tlabel_lock);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ alloc_mem(void **virt, void **phy, size_t size, uint32 protection,
|
|||||||
*virt = virtadr;
|
*virt = virtadr;
|
||||||
if (phy)
|
if (phy)
|
||||||
*phy = (void*)(addr_t)pe.address;
|
*phy = (void*)(addr_t)pe.address;
|
||||||
TRACE("area = %ld, size = %ld, virt = %p, phy = %p\n", area, size, virtadr,
|
TRACE("area = %ld, size = %ld, virt = %p, phy = %" B_PRIxPHYSADDR "\n", area, size, virtadr,
|
||||||
pe.address);
|
pe.address);
|
||||||
return area;
|
return area;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ enum {
|
|||||||
LED_SCROLL = 1,
|
LED_SCROLL = 1,
|
||||||
LED_NUM = 2,
|
LED_NUM = 2,
|
||||||
LED_CAPS = 4
|
LED_CAPS = 4
|
||||||
} leds_status;
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
EXTENDED_KEY = 0xe0,
|
EXTENDED_KEY = 0xe0,
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ static status_t
|
|||||||
scsi_create_autosense_request(scsi_device_info *device)
|
scsi_create_autosense_request(scsi_device_info *device)
|
||||||
{
|
{
|
||||||
scsi_ccb *request;
|
scsi_ccb *request;
|
||||||
char *buffer;
|
unsigned char *buffer;
|
||||||
scsi_cmd_request_sense *cmd;
|
scsi_cmd_request_sense *cmd;
|
||||||
size_t total_size;
|
size_t total_size;
|
||||||
|
|
||||||
|
|||||||
@@ -75,6 +75,6 @@ protected:
|
|||||||
}; // class CEchoGalsMTC
|
}; // class CEchoGalsMTC
|
||||||
|
|
||||||
|
|
||||||
#endif _CECHOGALSMTC_H_
|
#endif // _CECHOGALSMTC_H_
|
||||||
|
|
||||||
// *** CEchoGalsMTC.H ***
|
// *** CEchoGalsMTC.H ***
|
||||||
|
|||||||
@@ -98,6 +98,6 @@ alloc_mem(void **virt, void **phy, size_t size, uint32 protection,
|
|||||||
*virt = virtadr;
|
*virt = virtadr;
|
||||||
if (phy)
|
if (phy)
|
||||||
*phy = (void*)(addr_t)pe.address;
|
*phy = (void*)(addr_t)pe.address;
|
||||||
TRACE("area = %ld, size = %ld, virt = %p, phy = %p\n", areaid, size, virtadr, pe.address);
|
TRACE("area = %ld, size = %ld, virt = %p, phy = %" B_PRIxPHYSADDR "\n", areaid, size, virtadr, pe.address);
|
||||||
return areaid;
|
return areaid;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,5 +13,6 @@
|
|||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
void log_printall( FILE *logfile, char *buffer, uint32 buffer_len );
|
void log_printall( FILE *logfile, char *buffer, uint32 buffer_len );
|
||||||
|
void log_printentry( FILE *logfile, log_entry *entry );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ ale_attach(device_t dev)
|
|||||||
struct ale_softc *sc;
|
struct ale_softc *sc;
|
||||||
struct ifnet *ifp;
|
struct ifnet *ifp;
|
||||||
uint16_t burst;
|
uint16_t burst;
|
||||||
int error, i, msic, msixc, pmc;
|
int error, i, msic, msixc;
|
||||||
uint32_t rxf_len, txf_len;
|
uint32_t rxf_len, txf_len;
|
||||||
|
|
||||||
error = 0;
|
error = 0;
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ usb_printer_device_added(usb_device newDevice, void **cookie)
|
|||||||
if (freeDeviceMask != (uint32)-1) {
|
if (freeDeviceMask != (uint32)-1) {
|
||||||
// reuse device number of first 32 devices
|
// reuse device number of first 32 devices
|
||||||
for (int32 deviceNumber = 0; deviceNumber < 32; deviceNumber++) {
|
for (int32 deviceNumber = 0; deviceNumber < 32; deviceNumber++) {
|
||||||
if (freeDeviceMask & (1 << deviceNumber) == 0) {
|
if ((freeDeviceMask & (1 << deviceNumber)) == 0) {
|
||||||
device->device_number = deviceNumber;
|
device->device_number = deviceNumber;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,8 +97,8 @@ init_driver(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gDeviceNames[2 * kNumTTYs] = "ptmx";
|
gDeviceNames[2 * kNumTTYs] = (char *)"ptmx";
|
||||||
gDeviceNames[2 * kNumTTYs + 1] = "tty";
|
gDeviceNames[2 * kNumTTYs + 1] = (char *)"tty";
|
||||||
|
|
||||||
tty_add_debugger_commands();
|
tty_add_debugger_commands();
|
||||||
|
|
||||||
|
|||||||
@@ -625,8 +625,6 @@ ata_adapter_init_controller(device_node *node,
|
|||||||
pci_device *device;
|
pci_device *device;
|
||||||
ata_adapter_controller_info *controller;
|
ata_adapter_controller_info *controller;
|
||||||
uint16 bus_master_base;
|
uint16 bus_master_base;
|
||||||
uint16 pcicmdOld;
|
|
||||||
uint16 pcicmdNew;
|
|
||||||
|
|
||||||
// get device data
|
// get device data
|
||||||
if (sDeviceManager->get_attr_uint16(node, ATA_ADAPTER_BUS_MASTER_BASE, &bus_master_base, false) != B_OK)
|
if (sDeviceManager->get_attr_uint16(node, ATA_ADAPTER_BUS_MASTER_BASE, &bus_master_base, false) != B_OK)
|
||||||
|
|||||||
@@ -1566,9 +1566,9 @@ TCPEndpoint::_Receive(tcp_segment_header& segment, net_buffer* buffer)
|
|||||||
if ((segment.flags & TCP_FLAG_SYNCHRONIZE) != 0
|
if ((segment.flags & TCP_FLAG_SYNCHRONIZE) != 0
|
||||||
|| (fState == SYNCHRONIZE_RECEIVED
|
|| (fState == SYNCHRONIZE_RECEIVED
|
||||||
&& (fInitialReceiveSequence > segment.sequence
|
&& (fInitialReceiveSequence > segment.sequence
|
||||||
|| (segment.flags & TCP_FLAG_ACKNOWLEDGE) != 0
|
|| ((segment.flags & TCP_FLAG_ACKNOWLEDGE) != 0
|
||||||
&& (fSendUnacknowledged > segment.acknowledge
|
&& (fSendUnacknowledged > segment.acknowledge
|
||||||
|| fSendMax < segment.acknowledge)))) {
|
|| fSendMax < segment.acknowledge))))) {
|
||||||
// reset the connection - either the initial SYN was faulty, or we
|
// reset the connection - either the initial SYN was faulty, or we
|
||||||
// received a SYN within the data stream
|
// received a SYN within the data stream
|
||||||
return DROP | RESET;
|
return DROP | RESET;
|
||||||
|
|||||||
@@ -212,7 +212,6 @@ private:
|
|||||||
#define SIMPLE_PRINT(x) ;
|
#define SIMPLE_PRINT(x) ;
|
||||||
#define PRINT_INDENT(x) ;
|
#define PRINT_INDENT(x) ;
|
||||||
#define PRINT_DIVIDER() ;
|
#define PRINT_DIVIDER() ;
|
||||||
#define DUMP(object) ;
|
|
||||||
#define PDUMP(objectPointer) ;
|
#define PDUMP(objectPointer) ;
|
||||||
#define REPORT_ERROR(status) ;
|
#define REPORT_ERROR(status) ;
|
||||||
#define RETURN_ERROR(status) return status;
|
#define RETURN_ERROR(status) return status;
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ void RuleFilterConfig::MessageReceived(BMessage *msg) {
|
|||||||
{
|
{
|
||||||
case kMsgActionMoveTo:
|
case kMsgActionMoveTo:
|
||||||
case kMsgActionSetTo:
|
case kMsgActionSetTo:
|
||||||
if (BControl *control = (BControl *)arg->FindView("file_path"))
|
if (arg->FindView("file_path"))
|
||||||
arg->SetEnabled(true);
|
arg->SetEnabled(true);
|
||||||
if (BControl *control = (BControl *)arg->FindView("select_file"))
|
if (BControl *control = (BControl *)arg->FindView("select_file"))
|
||||||
control->SetEnabled(msg->what == kMsgActionMoveTo);
|
control->SetEnabled(msg->what == kMsgActionMoveTo);
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ void AGMSBayesianSpamFilterConfig::AttachedToWindow ()
|
|||||||
|
|
||||||
tempRect.right = fNoWordsMeansSpamCheckBoxPntr->Frame().left -
|
tempRect.right = fNoWordsMeansSpamCheckBoxPntr->Frame().left -
|
||||||
be_plain_font->StringWidth ("a");
|
be_plain_font->StringWidth ("a");
|
||||||
tempStringPntr = "Spam above:";
|
tempStringPntr = (char *)"Spam above:";
|
||||||
sprintf (numberString, "%06.4f", (double) fSpamCutoffRatio);
|
sprintf (numberString, "%06.4f", (double) fSpamCutoffRatio);
|
||||||
fSpamCutoffRatioTextBoxPntr = new BTextControl (
|
fSpamCutoffRatioTextBoxPntr = new BTextControl (
|
||||||
tempRect,
|
tempRect,
|
||||||
@@ -228,7 +228,7 @@ void AGMSBayesianSpamFilterConfig::AttachedToWindow ()
|
|||||||
|
|
||||||
// Add the box displaying the genuine cutoff ratio, on a line by itself.
|
// Add the box displaying the genuine cutoff ratio, on a line by itself.
|
||||||
|
|
||||||
tempStringPntr = "Genuine below and uncertain above:";
|
tempStringPntr = (char *)"Genuine below and uncertain above:";
|
||||||
sprintf (numberString, "%08.6f", (double) fGenuineCutoffRatio);
|
sprintf (numberString, "%08.6f", (double) fGenuineCutoffRatio);
|
||||||
fGenuineCutoffRatioTextBoxPntr = new BTextControl (
|
fGenuineCutoffRatioTextBoxPntr = new BTextControl (
|
||||||
tempRect,
|
tempRect,
|
||||||
|
|||||||
@@ -1099,6 +1099,7 @@ DVBMediaNode::Tune()
|
|||||||
fSelectedState, fSelectedRegion, fSelectedChannel, fSelectedAudio);
|
fSelectedState, fSelectedRegion, fSelectedChannel, fSelectedAudio);
|
||||||
|
|
||||||
status_t err;
|
status_t err;
|
||||||
|
bool needs_tuning = false;
|
||||||
|
|
||||||
if (fSelectedChannel < 0 || fSelectedAudio < 0) {
|
if (fSelectedChannel < 0 || fSelectedAudio < 0) {
|
||||||
printf("DVBMediaNode::Tune: invalid tuning info\n");
|
printf("DVBMediaNode::Tune: invalid tuning info\n");
|
||||||
@@ -1135,7 +1136,6 @@ DVBMediaNode::Tune()
|
|||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
bool needs_tuning;
|
|
||||||
switch (fInterfaceType) {
|
switch (fInterfaceType) {
|
||||||
case DVB_TYPE_DVB_T:
|
case DVB_TYPE_DVB_T:
|
||||||
needs_tuning = (fTuningParam.u.dvb_t.frequency != new_params.u.dvb_t.frequency) || !fTuningSuccess;
|
needs_tuning = (fTuningParam.u.dvb_t.frequency != new_params.u.dvb_t.frequency) || !fTuningSuccess;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ struct frac pad_rate[2] = {
|
|||||||
{203, 2997}, /* = (8000 - 29.97 * 250)/(29.97 * 250) */
|
{203, 2997}, /* = (8000 - 29.97 * 250)/(29.97 * 250) */
|
||||||
{1, 15}, /* = (8000 - 25 * 300)/(25 * 300) */
|
{1, 15}, /* = (8000 - 25 * 300)/(25 * 300) */
|
||||||
};
|
};
|
||||||
char *system_name[] = {"NTSC", "PAL"};
|
char *system_name[] = {(char *)"NTSC", (char *)"PAL"};
|
||||||
int frame_rate[] = {30, 25};
|
int frame_rate[] = {30, 25};
|
||||||
|
|
||||||
#define DV_PSIZE 512
|
#define DV_PSIZE 512
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ FireWireDVAddOn::AddDevice(FireWireCard* card, const char* path)
|
|||||||
|
|
||||||
// setup flavor info
|
// setup flavor info
|
||||||
dev->flavor.name = dev->name;
|
dev->flavor.name = dev->name;
|
||||||
dev->flavor.info = "The FireWireDVNode outputs to fw_raw drivers.";
|
dev->flavor.info = (char *)"The FireWireDVNode outputs to fw_raw drivers.";
|
||||||
dev->flavor.kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER
|
dev->flavor.kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER
|
||||||
| B_CONTROLLABLE | B_PHYSICAL_OUTPUT | B_PHYSICAL_INPUT;
|
| B_CONTROLLABLE | B_PHYSICAL_OUTPUT | B_PHYSICAL_INPUT;
|
||||||
dev->flavor.flavor_flags = B_FLAVOR_IS_GLOBAL;
|
dev->flavor.flavor_flags = B_FLAVOR_IS_GLOBAL;
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ AudioMixerAddon::AudioMixerAddon(image_id image)
|
|||||||
fFormat->u.raw_audio = media_raw_audio_format::wildcard;
|
fFormat->u.raw_audio = media_raw_audio_format::wildcard;
|
||||||
|
|
||||||
fInfo->internal_id = 0;
|
fInfo->internal_id = 0;
|
||||||
fInfo->name = "Audio Mixer (Haiku)";
|
fInfo->name = (char *)"Audio Mixer (Haiku)";
|
||||||
fInfo->info = "Haiku Audio Mixer media addon";
|
fInfo->info = (char *)"Haiku Audio Mixer media addon";
|
||||||
fInfo->kinds = B_BUFFER_PRODUCER | B_BUFFER_CONSUMER | B_SYSTEM_MIXER | B_CONTROLLABLE;
|
fInfo->kinds = B_BUFFER_PRODUCER | B_BUFFER_CONSUMER | B_SYSTEM_MIXER | B_CONTROLLABLE;
|
||||||
fInfo->flavor_flags = 0; // 0 = global or local instantiation allowed, no restrictions
|
fInfo->flavor_flags = 0; // 0 = global or local instantiation allowed, no restrictions
|
||||||
fInfo->possible_count = 0; // 0 = infinite
|
fInfo->possible_count = 0; // 0 = infinite
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ MultiAudioAddOn::AutoStart(int count, BMediaNode** _node, int32* _internalID,
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
MultiAudioAddOn::_RecursiveScan(char* rootPath, BEntry* rootEntry, uint32 depth)
|
MultiAudioAddOn::_RecursiveScan(const char* rootPath, BEntry* rootEntry, uint32 depth)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
if (depth > 16)
|
if (depth > 16)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public:
|
|||||||
int32* _internalID, bool* _hasMore);
|
int32* _internalID, bool* _hasMore);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
status_t _RecursiveScan(char* path, BEntry* rootEntry = NULL,
|
status_t _RecursiveScan(const char* path, BEntry* rootEntry = NULL,
|
||||||
uint32 depth = 0);
|
uint32 depth = 0);
|
||||||
void _SaveSettings();
|
void _SaveSettings();
|
||||||
void _LoadSettings();
|
void _LoadSettings();
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ OpenSoundAddOn::OpenSoundAddOn(image_id image) :
|
|||||||
fInitCheckStatus = B_NO_INIT;
|
fInitCheckStatus = B_NO_INIT;
|
||||||
|
|
||||||
/* unix paths */
|
/* unix paths */
|
||||||
if (RecursiveScan("/dev/oss/") != B_OK)
|
if (RecursiveScan((char *)"/dev/oss/") != B_OK)
|
||||||
return;
|
return;
|
||||||
/*
|
/*
|
||||||
if (RecursiveScan("/dev/audio/oss/") != B_OK)
|
if (RecursiveScan("/dev/audio/oss/") != B_OK)
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ int OpenSoundDeviceMixer::CountExtInfos()
|
|||||||
|
|
||||||
status_t OpenSoundDeviceMixer::GetExtInfo(int index, oss_mixext *info)
|
status_t OpenSoundDeviceMixer::GetExtInfo(int index, oss_mixext *info)
|
||||||
{
|
{
|
||||||
status_t err;
|
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
if (!info)
|
if (!info)
|
||||||
@@ -84,7 +83,6 @@ status_t OpenSoundDeviceMixer::GetExtInfo(int index, oss_mixext *info)
|
|||||||
|
|
||||||
status_t OpenSoundDeviceMixer::GetMixerValue(oss_mixer_value *value)
|
status_t OpenSoundDeviceMixer::GetMixerValue(oss_mixer_value *value)
|
||||||
{
|
{
|
||||||
status_t err;
|
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
if (!value)
|
if (!value)
|
||||||
@@ -105,7 +103,6 @@ status_t OpenSoundDeviceMixer::GetMixerValue(oss_mixer_value *value)
|
|||||||
|
|
||||||
status_t OpenSoundDeviceMixer::SetMixerValue(oss_mixer_value *value)
|
status_t OpenSoundDeviceMixer::SetMixerValue(oss_mixer_value *value)
|
||||||
{
|
{
|
||||||
status_t err;
|
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
if (!value)
|
if (!value)
|
||||||
@@ -126,7 +123,6 @@ status_t OpenSoundDeviceMixer::SetMixerValue(oss_mixer_value *value)
|
|||||||
|
|
||||||
status_t OpenSoundDeviceMixer::GetEnumInfo(int index, oss_mixer_enuminfo *info)
|
status_t OpenSoundDeviceMixer::GetEnumInfo(int index, oss_mixer_enuminfo *info)
|
||||||
{
|
{
|
||||||
status_t err;
|
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
if (!info)
|
if (!info)
|
||||||
|
|||||||
@@ -485,9 +485,9 @@ OpenSoundNode::NodeRegistered()
|
|||||||
mediaInput.destination.port = ControlPort();
|
mediaInput.destination.port = ControlPort();
|
||||||
mediaInput.destination.id = fInputs.CountItems();
|
mediaInput.destination.id = fInputs.CountItems();
|
||||||
mediaInput.node = Node();
|
mediaInput.node = Node();
|
||||||
char *prefix = "";
|
char *prefix = (char *)"";
|
||||||
if (strstr(engine->Info()->name, "SPDIF"))
|
if (strstr(engine->Info()->name, "SPDIF"))
|
||||||
prefix = "S/PDIF ";
|
prefix = (char *)"S/PDIF ";
|
||||||
sprintf(mediaInput.name, "%sOutput %ld (%s)", prefix,
|
sprintf(mediaInput.name, "%sOutput %ld (%s)", prefix,
|
||||||
mediaInput.destination.id, gSupportedFormatsNames[f]);
|
mediaInput.destination.id, gSupportedFormatsNames[f]);
|
||||||
|
|
||||||
@@ -533,9 +533,9 @@ OpenSoundNode::NodeRegistered()
|
|||||||
mediaOutput.source.port = ControlPort();
|
mediaOutput.source.port = ControlPort();
|
||||||
mediaOutput.source.id = fOutputs.CountItems();
|
mediaOutput.source.id = fOutputs.CountItems();
|
||||||
mediaOutput.node = Node();
|
mediaOutput.node = Node();
|
||||||
char *prefix = "";
|
char *prefix = (char *)"";
|
||||||
if (strstr(engine->Info()->name, "SPDIF"))
|
if (strstr(engine->Info()->name, "SPDIF"))
|
||||||
prefix = "S/PDIF ";
|
prefix = (char *)"S/PDIF ";
|
||||||
sprintf(mediaOutput.name, "%sInput %ld (%s)", prefix,
|
sprintf(mediaOutput.name, "%sInput %ld (%s)", prefix,
|
||||||
mediaOutput.source.id, gSupportedFormatsNames[f]);
|
mediaOutput.source.id, gSupportedFormatsNames[f]);
|
||||||
|
|
||||||
@@ -2672,8 +2672,8 @@ OpenSoundNode::GetFlavor(flavor_info* outInfo, int32 id)
|
|||||||
outInfo->out_formats = 0;
|
outInfo->out_formats = 0;
|
||||||
outInfo->internal_id = id;
|
outInfo->internal_id = id;
|
||||||
|
|
||||||
outInfo->name = "OpenSoundNode Node";
|
outInfo->name = (char *)"OpenSoundNode Node";
|
||||||
outInfo->info = "The OpenSoundNode outputs to OpenSound System v4 "
|
outInfo->info = (char *)"The OpenSoundNode outputs to OpenSound System v4 "
|
||||||
"drivers.";
|
"drivers.";
|
||||||
outInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_TIME_SOURCE
|
outInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_TIME_SOURCE
|
||||||
| B_PHYSICAL_OUTPUT | B_PHYSICAL_INPUT | B_CONTROLLABLE;
|
| B_PHYSICAL_OUTPUT | B_PHYSICAL_INPUT | B_CONTROLLABLE;
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ status_t ToneProducerAddOn::GetFlavorAt(
|
|||||||
|
|
||||||
flavor_info* pInfo = new flavor_info;
|
flavor_info* pInfo = new flavor_info;
|
||||||
pInfo->internal_id = n;
|
pInfo->internal_id = n;
|
||||||
pInfo->name = "Demo Audio Producer";
|
pInfo->name = (char *)"Demo Audio Producer";
|
||||||
pInfo->info =
|
pInfo->info = (char *)
|
||||||
"An add-on version of the ToneProducer node.\n"
|
"An add-on version of the ToneProducer node.\n"
|
||||||
"See the Be Developer Newsletter: 2 June, 1999\n"
|
"See the Be Developer Newsletter: 2 June, 1999\n"
|
||||||
"adapted by Eric Moon (4 June, 1999)";
|
"adapted by Eric Moon (4 June, 1999)";
|
||||||
|
|||||||
@@ -58,9 +58,6 @@ QuickCamDevice::SupportsIsochronous()
|
|||||||
status_t
|
status_t
|
||||||
QuickCamDevice::StartTransfer()
|
QuickCamDevice::StartTransfer()
|
||||||
{
|
{
|
||||||
status_t err;
|
|
||||||
uint8 r;
|
|
||||||
|
|
||||||
SetScale(1);
|
SetScale(1);
|
||||||
if (Sensor())
|
if (Sensor())
|
||||||
SetVideoFrame(BRect(0, 0, Sensor()->MaxWidth()-1, Sensor()->MaxHeight()-1));
|
SetVideoFrame(BRect(0, 0, Sensor()->MaxWidth()-1, Sensor()->MaxHeight()-1));
|
||||||
@@ -85,7 +82,6 @@ status_t
|
|||||||
QuickCamDevice::StopTransfer()
|
QuickCamDevice::StopTransfer()
|
||||||
{
|
{
|
||||||
status_t err;
|
status_t err;
|
||||||
uint8 r;
|
|
||||||
|
|
||||||
DumpRegs();
|
DumpRegs();
|
||||||
err = CamDevice::StopTransfer();
|
err = CamDevice::StopTransfer();
|
||||||
@@ -137,7 +133,6 @@ QuickCamDevice::GetStatusIIC()
|
|||||||
status_t
|
status_t
|
||||||
QuickCamDevice::WaitReadyIIC()
|
QuickCamDevice::WaitReadyIIC()
|
||||||
{
|
{
|
||||||
status_t err;
|
|
||||||
#warning WRITEME
|
#warning WRITEME
|
||||||
return EBUSY;
|
return EBUSY;
|
||||||
}
|
}
|
||||||
@@ -146,7 +141,6 @@ QuickCamDevice::WaitReadyIIC()
|
|||||||
ssize_t
|
ssize_t
|
||||||
QuickCamDevice::WriteIIC(uint8 address, uint8 *data, size_t count)
|
QuickCamDevice::WriteIIC(uint8 address, uint8 *data, size_t count)
|
||||||
{
|
{
|
||||||
status_t err;
|
|
||||||
int i;
|
int i;
|
||||||
uint8 buffer[0x23];
|
uint8 buffer[0x23];
|
||||||
if (count > 16)
|
if (count > 16)
|
||||||
@@ -174,7 +168,6 @@ ssize_t
|
|||||||
QuickCamDevice::ReadIIC8(uint8 address, uint8 *data)
|
QuickCamDevice::ReadIIC8(uint8 address, uint8 *data)
|
||||||
{
|
{
|
||||||
status_t err;
|
status_t err;
|
||||||
int i;
|
|
||||||
uint8 buffer[0x23];
|
uint8 buffer[0x23];
|
||||||
memset(buffer, 0, sizeof(buffer));
|
memset(buffer, 0, sizeof(buffer));
|
||||||
buffer[0x20] = Sensor() ? Sensor()->IICReadAddress() : 0;
|
buffer[0x20] = Sensor() ? Sensor()->IICReadAddress() : 0;
|
||||||
@@ -202,7 +195,6 @@ ssize_t
|
|||||||
QuickCamDevice::ReadIIC16(uint8 address, uint16 *data)
|
QuickCamDevice::ReadIIC16(uint8 address, uint16 *data)
|
||||||
{
|
{
|
||||||
status_t err;
|
status_t err;
|
||||||
int i;
|
|
||||||
uint8 buffer[0x23];
|
uint8 buffer[0x23];
|
||||||
memset(buffer, 0, sizeof(buffer));
|
memset(buffer, 0, sizeof(buffer));
|
||||||
buffer[0x20] = Sensor() ? Sensor()->IICReadAddress() : 0;
|
buffer[0x20] = Sensor() ? Sensor()->IICReadAddress() : 0;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ MediaAddOn::MediaAddOn(image_id imid)
|
|||||||
: BMediaAddOn(imid)
|
: BMediaAddOn(imid)
|
||||||
{
|
{
|
||||||
/* Customize these parameters to match those of your node */
|
/* Customize these parameters to match those of your node */
|
||||||
fFlavorInfo.name = "Demo Video Producer";
|
fFlavorInfo.name = (char *)"Demo Video Producer";
|
||||||
fFlavorInfo.info = "Demo Video Producer";
|
fFlavorInfo.info = (char *)"Demo Video Producer";
|
||||||
fFlavorInfo.kinds = B_BUFFER_PRODUCER | B_CONTROLLABLE;
|
fFlavorInfo.kinds = B_BUFFER_PRODUCER | B_CONTROLLABLE;
|
||||||
fFlavorInfo.flavor_flags = 0;
|
fFlavorInfo.flavor_flags = 0;
|
||||||
fFlavorInfo.internal_id = 0;
|
fFlavorInfo.internal_id = 0;
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ asfReader::AllocateCookie(int32 streamNumber, void **_cookie)
|
|||||||
TRACE("BlockAlign %d\n",audioFormat.BlockAlign);
|
TRACE("BlockAlign %d\n",audioFormat.BlockAlign);
|
||||||
TRACE("Bits %d\n",audioFormat.BitsPerSample);
|
TRACE("Bits %d\n",audioFormat.BitsPerSample);
|
||||||
|
|
||||||
uint32 sampleSize = (audioFormat.NoChannels * audioFormat.BitsPerSample / 8);
|
//uint32 sampleSize = (audioFormat.NoChannels * audioFormat.BitsPerSample / 8);
|
||||||
|
|
||||||
cookie->audio = true;
|
cookie->audio = true;
|
||||||
cookie->duration = theFileReader->getStreamDuration(streamNumber);
|
cookie->duration = theFileReader->getStreamDuration(streamNumber);
|
||||||
|
|||||||
@@ -329,7 +329,6 @@ status_t
|
|||||||
OggReader::FindLastPages()
|
OggReader::FindLastPages()
|
||||||
{
|
{
|
||||||
TRACE("OggReader::FindLastPages\n");
|
TRACE("OggReader::FindLastPages\n");
|
||||||
bigtime_t start_time = system_time();
|
|
||||||
|
|
||||||
status_t result = B_ERROR;
|
status_t result = B_ERROR;
|
||||||
|
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ OggSeekable::Seek(uint32 seekTo, int64 *frame, bigtime_t *time)
|
|||||||
if (granulepos != fFirstGranulepos) {
|
if (granulepos != fFirstGranulepos) {
|
||||||
// binary search to find our place
|
// binary search to find our place
|
||||||
off_t right = GetLastPagePosition();
|
off_t right = GetLastPagePosition();
|
||||||
uint width = (uint)log10(max_c(1, fFirstGranulepos + right)) + 2;
|
// uint width = (uint)log10(max_c(1, fFirstGranulepos + right)) + 2;
|
||||||
while (true) {
|
while (true) {
|
||||||
ogg_sync_reset(&fSync);
|
ogg_sync_reset(&fSync);
|
||||||
ogg_stream_reset(&fStreamState);
|
ogg_stream_reset(&fStreamState);
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
#include <InterfaceDefs.h>
|
#include <InterfaceDefs.h>
|
||||||
|
|
||||||
|
/*
|
||||||
static const char*
|
static const char*
|
||||||
kAbout =
|
kAbout =
|
||||||
"PDF Writer for BeOS\n"
|
"PDF Writer for BeOS\n"
|
||||||
@@ -44,3 +45,4 @@ B_UTF8_COPYRIGHT " 2001-2004 Haiku\n"
|
|||||||
"\tInteractive Features\n"
|
"\tInteractive Features\n"
|
||||||
"\t" B_UTF8_ELLIPSIS
|
"\t" B_UTF8_ELLIPSIS
|
||||||
;
|
;
|
||||||
|
*/
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ EXRTranslator::DerivedTranslate(BPositionIO* source,
|
|||||||
//Imath::Box2i dw = in.dataWindow();
|
//Imath::Box2i dw = in.dataWindow();
|
||||||
const Imath::Box2i &displayWindow = in.displayWindow();
|
const Imath::Box2i &displayWindow = in.displayWindow();
|
||||||
const Imath::Box2i &dataWindow = in.dataWindow();
|
const Imath::Box2i &dataWindow = in.dataWindow();
|
||||||
float a = in.pixelAspectRatio(); // TODO take into account the aspect ratio
|
//float a = in.pixelAspectRatio(); // TODO take into account the aspect ratio
|
||||||
int dataWidth = dataWindow.max.x - dataWindow.min.x + 1;
|
int dataWidth = dataWindow.max.x - dataWindow.min.x + 1;
|
||||||
int dataHeight = dataWindow.max.y - dataWindow.min.y + 1;
|
int dataHeight = dataWindow.max.y - dataWindow.min.y + 1;
|
||||||
int displayWidth = displayWindow.max.x - displayWindow.min.x + 1;
|
int displayWidth = displayWindow.max.x - displayWindow.min.x + 1;
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ GIFSave::NextPixel(int pixel)
|
|||||||
{
|
{
|
||||||
int bpr = bitmap->BytesPerRow();
|
int bpr = bitmap->BytesPerRow();
|
||||||
color_space cs = bitmap->ColorSpace();
|
color_space cs = bitmap->ColorSpace();
|
||||||
bool useAlphaForTransparency = prefs->usetransparentauto && cs == B_RGBA32 || cs == B_RGBA32_BIG;
|
bool useAlphaForTransparency = (prefs->usetransparentauto && cs == B_RGBA32) || cs == B_RGBA32_BIG;
|
||||||
unsigned char r, g, b, a;
|
unsigned char r, g, b, a;
|
||||||
|
|
||||||
if (cs == B_RGB32 || cs == B_RGBA32) {
|
if (cs == B_RGB32 || cs == B_RGBA32) {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ Prefs::~Prefs()
|
|||||||
|
|
||||||
// GetInt
|
// GetInt
|
||||||
bool
|
bool
|
||||||
Prefs::GetInt(char *name, int *value, int *defaultvalue)
|
Prefs::GetInt(const char *name, int *value, int *defaultvalue)
|
||||||
{
|
{
|
||||||
status_t err = file->ReadAttr(name, B_INT32_TYPE, 0, value, 4);
|
status_t err = file->ReadAttr(name, B_INT32_TYPE, 0, value, 4);
|
||||||
if (err == B_ENTRY_NOT_FOUND) {
|
if (err == B_ENTRY_NOT_FOUND) {
|
||||||
@@ -92,7 +92,7 @@ Prefs::GetInt(char *name, int *value, int *defaultvalue)
|
|||||||
|
|
||||||
// GetBool
|
// GetBool
|
||||||
bool
|
bool
|
||||||
Prefs::GetBool(char *name, bool *value, bool *defaultvalue)
|
Prefs::GetBool(const char *name, bool *value, bool *defaultvalue)
|
||||||
{
|
{
|
||||||
status_t err = file->ReadAttr(name, B_BOOL_TYPE, 0, value, 1);
|
status_t err = file->ReadAttr(name, B_BOOL_TYPE, 0, value, 1);
|
||||||
if (err == B_ENTRY_NOT_FOUND) {
|
if (err == B_ENTRY_NOT_FOUND) {
|
||||||
@@ -110,7 +110,7 @@ Prefs::GetBool(char *name, bool *value, bool *defaultvalue)
|
|||||||
|
|
||||||
// PutInt
|
// PutInt
|
||||||
bool
|
bool
|
||||||
Prefs::PutInt(char *name, int *value)
|
Prefs::PutInt(const char *name, int *value)
|
||||||
{
|
{
|
||||||
status_t err = file->WriteAttr(name, B_INT32_TYPE, 0, value, 4);
|
status_t err = file->WriteAttr(name, B_INT32_TYPE, 0, value, 4);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
@@ -122,7 +122,7 @@ Prefs::PutInt(char *name, int *value)
|
|||||||
|
|
||||||
// PutBool
|
// PutBool
|
||||||
bool
|
bool
|
||||||
Prefs::PutBool(char *name, bool *value)
|
Prefs::PutBool(const char *name, bool *value)
|
||||||
{
|
{
|
||||||
status_t err = file->WriteAttr(name, B_BOOL_TYPE, 0, value, 1);
|
status_t err = file->WriteAttr(name, B_BOOL_TYPE, 0, value, 1);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ class Prefs {
|
|||||||
int transparentred, transparentgreen,
|
int transparentred, transparentgreen,
|
||||||
transparentblue, palettemode, palette_size_in_bits;
|
transparentblue, palettemode, palette_size_in_bits;
|
||||||
private:
|
private:
|
||||||
bool GetInt(char *name, int *value, int *defaultvalue);
|
bool GetInt(const char *name, int *value, int *defaultvalue);
|
||||||
bool GetBool(char *name, bool *value, bool *defaultvalue);
|
bool GetBool(const char *name, bool *value, bool *defaultvalue);
|
||||||
bool PutInt(char *name, int *value);
|
bool PutInt(const char *name, int *value);
|
||||||
bool PutBool(char *name, bool *value);
|
bool PutBool(const char *name, bool *value);
|
||||||
|
|
||||||
BNode *file;
|
BNode *file;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ ICOTranslator::DerivedTranslate(BPositionIO *source,
|
|||||||
status_t
|
status_t
|
||||||
ICOTranslator::DerivedCanHandleImageSize(float width, float height) const
|
ICOTranslator::DerivedCanHandleImageSize(float width, float height) const
|
||||||
{
|
{
|
||||||
if (!ICO::is_valid_size(width) || !ICO::is_valid_size(height))
|
if (!ICO::is_valid_size((int)width) || !ICO::is_valid_size((int)height))
|
||||||
return B_NO_TRANSLATOR;
|
return B_NO_TRANSLATOR;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ add_to_message(TReadHelper& source, BMessage& target, tiff_tag& tag,
|
|||||||
|
|
||||||
// remove trailing spaces
|
// remove trailing spaces
|
||||||
int32 i = tag.length;
|
int32 i = tag.length;
|
||||||
while (--i > 0 && isspace(buffer[i]) || !buffer[i]) {
|
while ((--i > 0 && isspace(buffer[i])) || !buffer[i]) {
|
||||||
buffer[i] = '\0';
|
buffer[i] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const int kTerminatingSignal = SIGINT; // SIGCONT;
|
|||||||
// descriptors, which are each 8 bytes. We don't really need the first 5 bytes
|
// descriptors, which are each 8 bytes. We don't really need the first 5 bytes
|
||||||
// of the track descriptor, so we'll just ignore them. All we really want is the
|
// of the track descriptor, so we'll just ignore them. All we really want is the
|
||||||
// length of each track, which happen to be the last 3 bytes of the descriptor.
|
// length of each track, which happen to be the last 3 bytes of the descriptor.
|
||||||
typedef struct TrackRecord {
|
struct TrackRecord {
|
||||||
int8 unused[5];
|
int8 unused[5];
|
||||||
|
|
||||||
int8 min;
|
int8 min;
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ status_t AudioAdapterAddOn::GetFlavorAt(
|
|||||||
|
|
||||||
flavor_info* pInfo = new flavor_info;
|
flavor_info* pInfo = new flavor_info;
|
||||||
pInfo->internal_id = n;
|
pInfo->internal_id = n;
|
||||||
pInfo->name = "AudioAdapter";
|
pInfo->name = (char *)"AudioAdapter";
|
||||||
pInfo->info =
|
pInfo->info = (char *)
|
||||||
"AudioAdapter (generic raw-audio format conversion).\n"
|
"AudioAdapter (generic raw-audio format conversion).\n"
|
||||||
"by Eric Moon (8 September 1999)";
|
"by Eric Moon (8 September 1999)";
|
||||||
pInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_CONTROLLABLE;
|
pInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_CONTROLLABLE;
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ status_t FlangerAddOn::GetFlavorAt(
|
|||||||
|
|
||||||
flavor_info* pInfo = new flavor_info;
|
flavor_info* pInfo = new flavor_info;
|
||||||
pInfo->internal_id = n;
|
pInfo->internal_id = n;
|
||||||
pInfo->name = "Flanger";
|
pInfo->name = (char *)"Flanger";
|
||||||
pInfo->info =
|
pInfo->info = (char *)
|
||||||
"An add-on version of FlangerNode.\n"
|
"An add-on version of FlangerNode.\n"
|
||||||
"by Eric Moon (16 June, 1999)";
|
"by Eric Moon (16 June, 1999)";
|
||||||
pInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_CONTROLLABLE;
|
pInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER | B_CONTROLLABLE;
|
||||||
|
|||||||
@@ -242,10 +242,13 @@ TBeMenu::AddStandardBeMenuItems()
|
|||||||
AddSeparatorItem();
|
AddSeparatorItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
|
||||||
static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK(
|
static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK(
|
||||||
"About Haiku" B_UTF8_ELLIPSIS);
|
"About Haiku" B_UTF8_ELLIPSIS);
|
||||||
|
#else
|
||||||
static const char* kAboutThisSystemMenuItemStr = B_TRANSLATE_MARK(
|
static const char* kAboutThisSystemMenuItemStr = B_TRANSLATE_MARK(
|
||||||
"About this system" B_UTF8_ELLIPSIS);
|
"About this system" B_UTF8_ELLIPSIS);
|
||||||
|
#endif
|
||||||
|
|
||||||
item = new BMenuItem(
|
item = new BMenuItem(
|
||||||
#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
|
#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
|
||||||
@@ -300,9 +303,9 @@ TBeMenu::AddStandardBeMenuItems()
|
|||||||
item->SetEnabled(!dragging);
|
item->SetEnabled(!dragging);
|
||||||
shutdownMenu->AddItem(item);
|
shutdownMenu->AddItem(item);
|
||||||
|
|
||||||
|
#ifdef APM_SUPPORT
|
||||||
static const char* kSuspendMenuItemStr = B_TRANSLATE_MARK("Suspend");
|
static const char* kSuspendMenuItemStr = B_TRANSLATE_MARK("Suspend");
|
||||||
|
|
||||||
#ifdef APM_SUPPORT
|
|
||||||
if (_kapm_control_(APM_CHECK_ENABLED) == B_OK) {
|
if (_kapm_control_(APM_CHECK_ENABLED) == B_OK) {
|
||||||
item = new BMenuItem(B_TRANSLATE(kSuspendMenuItemStr),
|
item = new BMenuItem(B_TRANSLATE(kSuspendMenuItemStr),
|
||||||
new BMessage(kSuspendSystem));
|
new BMessage(kSuspendSystem));
|
||||||
|
|||||||
@@ -546,7 +546,7 @@ TResourceSet::ExpandString(BString* out, const char* in)
|
|||||||
in++;
|
in++;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
while (isalnum(*in) || *in == '_' && i
|
while ((isalnum(*in) || *in == '_') && i
|
||||||
< sizeof(variableName) - 1)
|
< sizeof(variableName) - 1)
|
||||||
variableName[i++] = *in++;
|
variableName[i++] = *in++;
|
||||||
|
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ TTeamMenuItem::Draw()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if not selected or being tracked on, fill with gray
|
// if not selected or being tracked on, fill with gray
|
||||||
if (!_IsSelected() && !menu->IsRedrawAfterSticky() || !canHandle
|
if ((!_IsSelected() && !menu->IsRedrawAfterSticky()) || !canHandle
|
||||||
|| !IsEnabled()) {
|
|| !IsEnabled()) {
|
||||||
frame.InsetBy(1, 1);
|
frame.InsetBy(1, 1);
|
||||||
menu->SetHighColor(menuColor);
|
menu->SetHighColor(menuColor);
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ TWindowMenuItem::Draw()
|
|||||||
|
|
||||||
// if not selected or being tracked on, fill with gray
|
// if not selected or being tracked on, fill with gray
|
||||||
TBarView* barview = (static_cast<TBarApp*>(be_app))->BarView();
|
TBarView* barview = (static_cast<TBarApp*>(be_app))->BarView();
|
||||||
if (!IsSelected() && !menu->IsRedrawAfterSticky()
|
if ((!IsSelected() && !menu->IsRedrawAfterSticky())
|
||||||
|| barview->Dragging() || !IsEnabled()) {
|
|| barview->Dragging() || !IsEnabled()) {
|
||||||
|
|
||||||
rgb_color shadow = tint_color(menuColor, 1.09);
|
rgb_color shadow = tint_color(menuColor, 1.09);
|
||||||
@@ -294,8 +294,8 @@ TWindowMenuItem::Invoke(BMessage* /*message*/)
|
|||||||
|
|
||||||
if (item->Menu()->Window() != NULL) {
|
if (item->Menu()->Window() != NULL) {
|
||||||
zoomRect = item->Menu()->ConvertToScreen(item->Frame());
|
zoomRect = item->Menu()->ConvertToScreen(item->Frame());
|
||||||
doZoom = fMini && action == B_BRING_TO_FRONT
|
doZoom = (fMini && action == B_BRING_TO_FRONT)
|
||||||
|| !fMini && action == B_MINIMIZE_WINDOW;
|
|| (!fMini && action == B_MINIMIZE_WINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
do_window_action(fID, action, zoomRect, doZoom);
|
do_window_action(fID, action, zoomRect, doZoom);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
|
|
||||||
static const char* kSettingsFileName = "DeskCalc_settings";
|
static const char* kSettingsFileName = "DeskCalc_settings";
|
||||||
extern const char* kAppSig = "application/x-vnd.Haiku-DeskCalc";
|
const char* kAppSig = "application/x-vnd.Haiku-DeskCalc";
|
||||||
|
|
||||||
static const float kDefaultWindowWidth = 220.0;
|
static const float kDefaultWindowWidth = 220.0;
|
||||||
static const float kDefaultWindowHeight = 140.0;
|
static const float kDefaultWindowHeight = 140.0;
|
||||||
|
|||||||
@@ -665,7 +665,7 @@ DragSortableListView::ScrollTo(int32 index)
|
|||||||
if (index >= CountItems())
|
if (index >= CountItems())
|
||||||
index = CountItems() - 1;
|
index = CountItems() - 1;
|
||||||
|
|
||||||
if (BListItem* item = ItemAt(index)) {
|
if (ItemAt(index)) {
|
||||||
BRect itemFrame = ItemFrame(index);
|
BRect itemFrame = ItemFrame(index);
|
||||||
BRect bounds = Bounds();
|
BRect bounds = Bounds();
|
||||||
if (itemFrame.top < bounds.top) {
|
if (itemFrame.top < bounds.top) {
|
||||||
@@ -882,7 +882,7 @@ DragSortableListView::_SetDropIndex(int32 index)
|
|||||||
int32 count = CountItems();
|
int32 count = CountItems();
|
||||||
if (fDropIndex == count) {
|
if (fDropIndex == count) {
|
||||||
BRect r;
|
BRect r;
|
||||||
if (BListItem* item = ItemAt(count - 1)) {
|
if (ItemAt(count - 1)) {
|
||||||
r = ItemFrame(count - 1);
|
r = ItemFrame(count - 1);
|
||||||
r.top = r.bottom;
|
r.top = r.bottom;
|
||||||
r.bottom = r.top + 1.0;
|
r.bottom = r.top + 1.0;
|
||||||
|
|||||||
@@ -425,7 +425,7 @@ set_bits(uint8* bits, uint8 r, uint8 g, uint8 b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// _UpdateThread
|
// _UpdateThread
|
||||||
int32
|
status_t
|
||||||
ColorField::_UpdateThread(void* data)
|
ColorField::_UpdateThread(void* data)
|
||||||
{
|
{
|
||||||
// initializing
|
// initializing
|
||||||
@@ -589,6 +589,7 @@ ColorField::_UpdateThread(void* data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// _DrawBorder
|
// _DrawBorder
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class ColorField :
|
|||||||
{ return fMouseDown; }
|
{ return fMouseDown; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static int32 _UpdateThread(void* data);
|
static status_t _UpdateThread(void* data);
|
||||||
void _DrawBorder();
|
void _DrawBorder();
|
||||||
|
|
||||||
selected_color_mode fMode;
|
selected_color_mode fMode;
|
||||||
|
|||||||
@@ -513,7 +513,7 @@ ColorSlider::SetMarkerToColor(rgb_color color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// _UpdateThread
|
// _UpdateThread
|
||||||
int32
|
status_t
|
||||||
ColorSlider::_UpdateThread(void* data)
|
ColorSlider::_UpdateThread(void* data)
|
||||||
{
|
{
|
||||||
// initializing
|
// initializing
|
||||||
@@ -632,6 +632,7 @@ ColorSlider::_UpdateThread(void* data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// _DrawColorLineY
|
// _DrawColorLineY
|
||||||
|
|||||||
@@ -554,8 +554,8 @@ IconButton::Bitmap() const
|
|||||||
bool
|
bool
|
||||||
IconButton::DrawBorder() const
|
IconButton::DrawBorder() const
|
||||||
{
|
{
|
||||||
return (IsEnabled() && (_HasFlags(STATE_INSIDE)
|
return ((IsEnabled() && (_HasFlags(STATE_INSIDE)
|
||||||
|| _HasFlags(STATE_TRACKING)) || _HasFlags(STATE_FORCE_PRESSED));
|
|| _HasFlags(STATE_TRACKING))) || _HasFlags(STATE_FORCE_PRESSED));
|
||||||
}
|
}
|
||||||
|
|
||||||
// DrawNormalBorder
|
// DrawNormalBorder
|
||||||
|
|||||||
@@ -1901,7 +1901,7 @@ TTextView::Open(hyper_text *enclosure)
|
|||||||
|
|
||||||
case TYPE_MAILTO:
|
case TYPE_MAILTO:
|
||||||
if (be_roster->Launch(B_MAIL_TYPE, 1, &enclosure->name) < B_OK) {
|
if (be_roster->Launch(B_MAIL_TYPE, 1, &enclosure->name) < B_OK) {
|
||||||
char *argv[] = {"Mail", enclosure->name};
|
char *argv[] = {(char *)"Mail", enclosure->name};
|
||||||
be_app->ArgvReceived(2, argv);
|
be_app->ArgvReceived(2, argv);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -614,7 +614,7 @@ DragSortableListView::ScrollTo(int32 index)
|
|||||||
if (index >= CountItems())
|
if (index >= CountItems())
|
||||||
index = CountItems() - 1;
|
index = CountItems() - 1;
|
||||||
|
|
||||||
if (BListItem* item = ItemAt(index)) {
|
if (ItemAt(index)) {
|
||||||
BRect itemFrame = ItemFrame(index);
|
BRect itemFrame = ItemFrame(index);
|
||||||
BRect bounds = Bounds();
|
BRect bounds = Bounds();
|
||||||
if (itemFrame.top < bounds.top) {
|
if (itemFrame.top < bounds.top) {
|
||||||
@@ -791,7 +791,7 @@ DragSortableListView::_SetDropIndex(int32 index)
|
|||||||
int32 count = CountItems();
|
int32 count = CountItems();
|
||||||
if (fDropIndex == count) {
|
if (fDropIndex == count) {
|
||||||
BRect r;
|
BRect r;
|
||||||
if (BListItem* item = ItemAt(count - 1)) {
|
if (ItemAt(count - 1)) {
|
||||||
r = ItemFrame(count - 1);
|
r = ItemFrame(count - 1);
|
||||||
r.top = r.bottom;
|
r.top = r.bottom;
|
||||||
r.bottom = r.top + 1.0;
|
r.bottom = r.top + 1.0;
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ PoorManServer::PoorManServer(const char* webDir,
|
|||||||
(unsigned short)80,//port
|
(unsigned short)80,//port
|
||||||
(char*)0,//cgi pattern
|
(char*)0,//cgi pattern
|
||||||
0,//cgi_limit
|
0,//cgi_limit
|
||||||
"iso-8859-1",//charset
|
(char *)"iso-8859-1",//charset
|
||||||
"",//p3p
|
(char *)"",//p3p
|
||||||
-1,//max_age
|
-1,//max_age
|
||||||
const_cast<char*>(webDir),//cwd
|
const_cast<char*>(webDir),//cwd
|
||||||
1,//no_log
|
1,//no_log
|
||||||
@@ -232,7 +232,7 @@ int32 PoorManServer::_Listener(void* data)
|
|||||||
|
|
||||||
if (s->fCurConns > s->fMaxConns) {
|
if (s->fCurConns > s->fMaxConns) {
|
||||||
httpd_send_err(hc, 503,
|
httpd_send_err(hc, 503,
|
||||||
httpd_err503title, "", httpd_err503form, "");
|
httpd_err503title, (char *)"", httpd_err503form, (char *)"");
|
||||||
httpd_write_response(hc);
|
httpd_write_response(hc);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -292,7 +292,7 @@ int32 PoorManServer::_Worker(void* data)
|
|||||||
break;
|
break;
|
||||||
case GR_BAD_REQUEST:
|
case GR_BAD_REQUEST:
|
||||||
httpd_send_err(hc, 400,
|
httpd_send_err(hc, 400,
|
||||||
httpd_err400title, "", httpd_err400form, "");
|
httpd_err400title, (char *)"", httpd_err400form, (char *)"");
|
||||||
httpd_write_response(hc);//fall through
|
httpd_write_response(hc);//fall through
|
||||||
case GR_NO_REQUEST: //fall through
|
case GR_NO_REQUEST: //fall through
|
||||||
default: //won't happen
|
default: //won't happen
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ before_dano()
|
|||||||
get_system_info(&sys_info);
|
get_system_info(&sys_info);
|
||||||
time_t kernelTime = parsedate(sys_info.kernel_build_date, time(NULL));
|
time_t kernelTime = parsedate(sys_info.kernel_build_date, time(NULL));
|
||||||
struct tm* date = gmtime(&kernelTime);
|
struct tm* date = gmtime(&kernelTime);
|
||||||
old_version = (date->tm_year < 101 || date->tm_year == 101 && date->tm_mon < 10);
|
old_version = (date->tm_year < 101 || (date->tm_year == 101 && date->tm_mon < 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
return old_version;
|
return old_version;
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ Scaler::~Scaler()
|
|||||||
BBitmap*
|
BBitmap*
|
||||||
Scaler::CreateDestImage(BBitmap* srcImage)
|
Scaler::CreateDestImage(BBitmap* srcImage)
|
||||||
{
|
{
|
||||||
if (srcImage == NULL || srcImage->ColorSpace() != B_RGB32 && srcImage->ColorSpace() != B_RGBA32) return NULL;
|
if (srcImage == NULL || (srcImage->ColorSpace() != B_RGB32 && srcImage->ColorSpace() != B_RGBA32)) return NULL;
|
||||||
|
|
||||||
BRect dest(0, 0, fRect.IntegerWidth(), fRect.IntegerHeight());
|
BRect dest(0, 0, fRect.IntegerWidth(), fRect.IntegerHeight());
|
||||||
BBitmap* destImage = new BBitmap(dest, fDither ? B_CMAP8 : srcImage->ColorSpace());
|
BBitmap* destImage = new BBitmap(dest, fDither ? B_CMAP8 : srcImage->ColorSpace());
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ TrackSlider::_InitBitmap()
|
|||||||
|
|
||||||
fBitmap = new BBitmap(rect, BScreen().ColorSpace(), true);
|
fBitmap = new BBitmap(rect, BScreen().ColorSpace(), true);
|
||||||
|
|
||||||
fBitmapView = new SliderOffscreenView(rect.OffsetToSelf(B_ORIGIN), "bitmapView");
|
fBitmapView = new SliderOffscreenView(rect.OffsetToSelf(B_ORIGIN), (char *)"bitmapView");
|
||||||
fBitmap->AddChild(fBitmapView);
|
fBitmap->AddChild(fBitmapView);
|
||||||
|
|
||||||
fBitmapView->fRight = Bounds().right - kLeftRightTrackSliderWidth;
|
fBitmapView->fRight = Bounds().right - kLeftRightTrackSliderWidth;
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ status_t BSimpleMailAttachment::SetDecodedData(const void *data, size_t length)
|
|||||||
void BSimpleMailAttachment::SetEncoding(mail_encoding encoding) {
|
void BSimpleMailAttachment::SetEncoding(mail_encoding encoding) {
|
||||||
_encoding = encoding;
|
_encoding = encoding;
|
||||||
|
|
||||||
char *cte = NULL; //--Content Transfer Encoding
|
const char *cte = NULL; //--Content Transfer Encoding
|
||||||
switch (_encoding) {
|
switch (_encoding) {
|
||||||
case base64:
|
case base64:
|
||||||
cte = "base64";
|
cte = "base64";
|
||||||
|
|||||||
@@ -95,9 +95,9 @@ BMailChain::Load(BMessage* settings)
|
|||||||
char* addon_path;
|
char* addon_path;
|
||||||
|
|
||||||
if (settings->FindMessage("filter_settings", i, filter) < B_OK
|
if (settings->FindMessage("filter_settings", i, filter) < B_OK
|
||||||
|| (settings->FindString("filter_addons", i, (const char**)&addon_path) < B_OK
|
|| ((settings->FindString("filter_addons", i, (const char**)&addon_path) < B_OK
|
||||||
|| get_ref_for_path(addon_path, ref) < B_OK)
|
|| get_ref_for_path(addon_path, ref) < B_OK)
|
||||||
&& settings->FindRef("filter_addons", i, ref) < B_OK) {
|
&& settings->FindRef("filter_addons", i, ref) < B_OK)) {
|
||||||
delete filter;
|
delete filter;
|
||||||
delete ref;
|
delete ref;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ struct CharsetConversionEntry
|
|||||||
extern const CharsetConversionEntry mail_charsets[];
|
extern const CharsetConversionEntry mail_charsets[];
|
||||||
|
|
||||||
|
|
||||||
extern const char *kHeaderCharsetString = "header-charset";
|
const char *kHeaderCharsetString = "header-charset";
|
||||||
extern const char *kHeaderEncodingString = "header-encoding";
|
const char *kHeaderEncodingString = "header-encoding";
|
||||||
// Special field names in the headers which specify the character set (int32)
|
// Special field names in the headers which specify the character set (int32)
|
||||||
// and encoding (int8) to use when converting the headers from UTF-8 to the
|
// and encoding (int8) to use when converting the headers from UTF-8 to the
|
||||||
// output e-mail format (rfc2047). Since they are numbers, not strings, the
|
// output e-mail format (rfc2047). Since they are numbers, not strings, the
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ BMediaTrack::ReadChunk(char** _buffer, int32* _size, media_header* _header)
|
|||||||
// not work so well because of the chunk cache. But providing a
|
// not work so well because of the chunk cache. But providing a
|
||||||
// "duration" field in the media_header could be useful.
|
// "duration" field in the media_header could be useful.
|
||||||
fCurrentTime = fCurrentTime = _header->start_time;
|
fCurrentTime = fCurrentTime = _header->start_time;
|
||||||
fCurrentFrame = fCurrentTime * _FrameRate() / 1000000LL;
|
fCurrentFrame = (int64)(fCurrentTime * _FrameRate() / 1000000LL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -449,9 +449,9 @@ TrackerString::MatchesBracketExpression(const char *string, const char *pattern,
|
|||||||
return false;
|
return false;
|
||||||
// Not a valid range!
|
// Not a valid range!
|
||||||
|
|
||||||
if (islower(start) && islower(stop)
|
if ((islower(start) && islower(stop))
|
||||||
|| isupper(start) && isupper(stop)
|
|| (isupper(start) && isupper(stop))
|
||||||
|| isdigit(start) && isdigit(stop))
|
|| (isdigit(start) && isdigit(stop)))
|
||||||
// Make sure 'start' and 'stop' are of the same type.
|
// Make sure 'start' and 'stop' are of the same type.
|
||||||
match = start <= testChar && testChar <= stop;
|
match = start <= testChar && testChar <= stop;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ DeskbarView::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case MD_OPEN_NEW:
|
case MD_OPEN_NEW:
|
||||||
{
|
{
|
||||||
char* argv[] = {"New Message", "mailto:"};
|
char* argv[] = {(char *)"New Message", (char *)"mailto:"};
|
||||||
be_roster->Launch("text/x-email", 2, argv);
|
be_roster->Launch("text/x-email", 2, argv);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user