~ubuntu-branches/ubuntu/saucy/links2/saucy-proposed

« back to all changes in this revision

Viewing changes to pmshell.c

  • Committer: Bazaar Package Importer
  • Author(s): Axel Beckert
  • Date: 2011-08-18 23:35:41 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110818233541-3x10px37rwkortla
Tags: 2.3-1
* New upstream release.
  + Refreshed patches links2-instead-of-links.diff and ipv6.diff
  + Fixes downloads of files larger than 4GB (Closes: #610418)
* Fix debian/watch so that upstream versions are sorted properly; add
  and prefer bzip2 compressed upstream tarballs.
* Add missing bug number for IPv6 patch in the previous changelog entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
#include <sys/builtin.h>
29
29
#include <sys/fmutex.h>
30
 
_fmutex pm_mutex;
 
30
static _fmutex pm_mutex;
31
31
#define pm_lock_init    _fmutex_create(&pm_mutex, 0)
32
32
#define pm_lock         _fmutex_request(&pm_mutex, _FMR_IGNINT)
33
33
#define pm_unlock       _fmutex_release(&pm_mutex)
34
34
 
35
 
unsigned char *pm_class_name = "links";
36
 
unsigned char *pm_msg_class_name = "links.msg";
37
 
 
38
 
ULONG pm_frame = (FCF_TITLEBAR | FCF_SYSMENU | FCF_SIZEBORDER | FCF_MINMAX | FCF_SHELLPOSITION | FCF_TASKLIST | FCF_NOBYTEALIGN);
39
 
 
40
 
ULONG pm_msg_frame = 0;
41
 
 
42
 
MRESULT EXPENTRY pm_window_proc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
43
 
MRESULT EXPENTRY pm_msg_proc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
 
35
static unsigned char *pm_class_name = "links";
 
36
static unsigned char *pm_msg_class_name = "links.msg";
 
37
 
 
38
static ULONG pm_frame = (FCF_TITLEBAR | FCF_SYSMENU | FCF_SIZEBORDER | FCF_MINMAX | FCF_SHELLPOSITION | FCF_TASKLIST | FCF_NOBYTEALIGN);
 
39
 
 
40
static ULONG pm_msg_frame = 0;
 
41
 
 
42
static MRESULT EXPENTRY pm_window_proc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
 
43
static MRESULT EXPENTRY pm_msg_proc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
44
44
 
45
45
#define E_KEY           1
46
46
#define E_MOUSE         2
72
72
 
73
73
#define WIN_HASH        64
74
74
 
75
 
struct pm_window *pm_windows[WIN_HASH];
 
75
static struct pm_window *pm_windows[WIN_HASH];
76
76
 
77
77
static void pm_hash_window(struct pm_window *win)
78
78
{
97
97
 
98
98
#define pm_win(dev) ((struct pm_window *)dev->driver_data)
99
99
 
100
 
int pm_pipe[2];
 
100
static int pm_pipe[2];
101
101
 
102
 
HEV pm_sem;
103
 
ULONG pm_sem_dummy;
 
102
static HEV pm_sem;
 
103
static ULONG pm_sem_dummy;
104
104
 
105
105
#define pm_wait do {                                    \
106
106
        DosWaitEventSem(pm_sem, SEM_INDEFINITE_WAIT);   \
109
109
 
110
110
#define pm_signal DosPostEventSem(pm_sem)
111
111
 
112
 
unsigned char *pm_not_ses = "Not in a pmshell session.\n";
113
 
unsigned char *pm_status;
114
 
 
115
 
HAB hab_disp;
116
 
HAB hab;
117
 
HMQ hmq;
118
 
HWND hwnd_msg;
119
 
HPS hps_msg;
120
 
HDC hdc_mem;
121
 
HPS hps_mem;
122
 
 
123
 
int pm_cp;
124
 
 
125
 
struct list_head pm_event_windows = { &pm_event_windows, &pm_event_windows };
 
112
static unsigned char *pm_not_ses = "Not in a pmshell session.\n";
 
113
static unsigned char *pm_status;
 
114
 
 
115
static HAB hab_disp;
 
116
static HAB hab;
 
117
static HMQ hmq;
 
118
static HWND hwnd_msg;
 
119
static HPS hps_msg;
 
120
static HDC hdc_mem;
 
121
static HPS hps_mem;
 
122
 
 
123
static int pm_cp;
 
124
 
 
125
static struct list_head pm_event_windows = { &pm_event_windows, &pm_event_windows };
126
126
 
127
127
static void pm_send_event(struct pm_window *win, int t, int x1, int y1, int x2, int y2)
128
128
{
199
199
 
200
200
#define N_VK    0x42
201
201
 
202
 
struct os2_key pm_vk_table[N_VK] = {
 
202
static struct os2_key pm_vk_table[N_VK] = {
203
203
        {0, 0}, {0, 0}, {0, 0}, {0, 0}, {KBD_CTRL_C, 0}, {KBD_BS, 0}, {KBD_TAB, 0}, {KBD_TAB, KBD_SHIFT},
204
204
        {KBD_ENTER, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {KBD_ESC, 0},
205
205
        {' ', 0}, {KBD_PAGE_UP, 0}, {KBD_PAGE_DOWN, 0}, {KBD_END, 0}, {KBD_HOME, 0}, {KBD_LEFT, 0}, {KBD_UP, 0}, {KBD_RIGHT, 0},
359
359
        return WinDefWindowProc(hwnd, msg, mp1, mp2);
360
360
}
361
361
 
362
 
int pm_thread_shutdown;
 
362
static int pm_thread_shutdown;
363
363
 
364
364
#define MSG_CREATE_WINDOW       1
365
365
#define MSG_DELETE_WINDOW       2
526
526
        free(ev);
527
527
}
528
528
 
529
 
BITMAPINFO *pm_bitmapinfo;
530
 
 
531
 
int pm_bitmap_count;
532
 
 
533
 
pid_t pm_child_pid;
 
529
static BITMAPINFO *pm_bitmapinfo;
 
530
 
 
531
static int pm_bitmap_count;
 
532
 
 
533
static pid_t pm_child_pid;
534
534
 
535
535
static void pm_sigcld(void *p)
536
536
{
541
541
        else exit(RET_FATAL);
542
542
}
543
543
 
544
 
int pm_sin, pm_sout, pm_serr, pm_ip[2], pm_op[2], pm_ep[2];
545
 
int pm_cons_ok = 0;
 
544
static int pm_sin, pm_sout, pm_serr, pm_ip[2], pm_op[2], pm_ep[2];
 
545
static int pm_cons_ok = 0;
546
546
        
547
547
static void pm_setup_console(void)
548
548
{