Merge lp:~raff367/cuneiform-linux/main into lp:cuneiform-linux/0.6

Proposed by raff
Status: Merged
Merged at revision: not available
Proposed branch: lp:~raff367/cuneiform-linux/main
Merge into: lp:cuneiform-linux/0.6
Diff against target: None lines
To merge this branch: bzr merge lp:~raff367/cuneiform-linux/main
Reviewer Review Type Date Requested Status
Jussi Pakkanen Pending
Review via email: mp+10390@code.launchpad.net
To post a comment you must log in.
Revision history for this message
raff (raff367) wrote :

I have just made a few minor changes that allow Cuneiform to run on Cygwin. Basically all it needed to do is to treat Cygwin as WIN32 in all the places where there are checks for \n vs. \r
(changed #ifdef WIN32 to #if defined(WIN32) || defined(__CYGWIN__)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cuneiform_src/Kern/cfcompat/cfcompat.c'
2--- cuneiform_src/Kern/cfcompat/cfcompat.c 2009-07-20 15:38:28 +0000
3+++ cuneiform_src/Kern/cfcompat/cfcompat.c 2009-08-19 13:35:30 +0000
4@@ -269,9 +269,11 @@
5 return 0;
6 }
7
8+#ifndef __CYGWIN__
9 void strlwr(char *foo) {
10 // FIXME: this is probably actually used somewhere.
11 }
12+#endif
13
14 HWND CreateWindow(
15 LPCTSTR lpClassName,
16
17=== modified file 'cuneiform_src/Kern/include/cfcompat.h'
18--- cuneiform_src/Kern/include/cfcompat.h 2009-06-02 09:17:20 +0000
19+++ cuneiform_src/Kern/include/cfcompat.h 2009-08-19 13:35:30 +0000
20@@ -108,7 +108,9 @@
21 CFCOMPAT_FUNC(BOOL) EndPaint(HWND hWnd, ...);
22 CFCOMPAT_FUNC(HDC) BeginPaint(HWND hwnd,...);
23 CFCOMPAT_FUNC(LRESULT) SendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
24+#ifndef __CYGWIN__
25 CFCOMPAT_FUNC(void) strlwr(char *foo);
26+#endif
27 CFCOMPAT_FUNC(HWND) CreateWindow(
28 LPCTSTR lpClassName,
29 LPCTSTR lpWindowName,
30
31=== modified file 'cuneiform_src/Kern/rling/sources/c/rling_ma.c'
32--- cuneiform_src/Kern/rling/sources/c/rling_ma.c 2009-01-21 14:52:06 +0000
33+++ cuneiform_src/Kern/rling/sources/c/rling_ma.c 2009-08-19 13:35:30 +0000
34@@ -400,7 +400,7 @@
35
36 /* MinGW file io seems to turn windows file endings into \n
37 so break -- no skip as when the \r is passed through */
38-#ifdef WIN32
39+#if defined(WIN32) || defined(__CYGWIN__)
40 if ( ch == '\n' ) {
41 break;
42 }
43
44=== modified file 'cuneiform_src/Kern/rout/src/rout.cpp'
45--- cuneiform_src/Kern/rout/src/rout.cpp 2008-09-18 11:46:37 +0000
46+++ cuneiform_src/Kern/rout/src/rout.cpp 2009-08-19 13:35:30 +0000
47@@ -973,7 +973,7 @@
48 FILE *f = NULL;
49 int fd;
50 char buf[256] = "";
51-#ifdef WIN32
52+#if defined(WIN32) || defined(__CYGWIN__)
53 const char line_end = '\n';
54 #else
55 const char line_end = '\r';
56
57=== modified file 'cuneiform_src/Kern/rout/src/rout_own.h'
58--- cuneiform_src/Kern/rout/src/rout_own.h 2009-02-02 17:08:58 +0000
59+++ cuneiform_src/Kern/rout/src/rout_own.h 2009-08-19 13:35:30 +0000
60@@ -196,7 +196,7 @@
61 EXTERN BOOL langKaz VAL(FALSE);
62
63 // Êîíåö ñòðîêè
64-#if defined(_WIN32)
65+#if defined(_WIN32) || defined(__CYGWIN__)
66 EXTERN char gEOL[4] VAL2(0x0d,0x0a);
67 #else
68 EXTERN char gEOL[4] VAL2(0x0a, 0x00);
69
70=== modified file 'cuneiform_src/Kern/rselstr/sources/src/chstr/cutstr/chstr_cutstr.cpp'
71--- cuneiform_src/Kern/rselstr/sources/src/chstr/cutstr/chstr_cutstr.cpp 2009-02-02 17:08:58 +0000
72+++ cuneiform_src/Kern/rselstr/sources/src/chstr/cutstr/chstr_cutstr.cpp 2009-08-19 13:35:30 +0000
73@@ -711,6 +711,12 @@
74 // äëÿ DebugBreakEx() (ñì. íèæå);
75 // ñóùåñòâóåò òîëüêî â Windows ñòàðøå W98 (W98 ãîäèòñÿ)
76 // èëè ñòàðøå NT 4.0 (NT 4.0 ãîäèòñÿ)
77+ #ifndef WINBASEAPI
78+ #define WINBASEAPI
79+ #endif
80+ #ifndef VOID
81+ #define VOID
82+ #endif
83 extern "C" {
84 WINBASEAPI BOOL WINAPI IsDebuggerPresent(VOID);
85 }
86
87=== modified file 'cuneiform_src/Kern/std/src/_prt.h'
88--- cuneiform_src/Kern/std/src/_prt.h 2008-09-04 09:14:35 +0000
89+++ cuneiform_src/Kern/std/src/_prt.h 2009-08-19 13:35:30 +0000
90@@ -60,6 +60,9 @@
91 #include <string>
92 #include <list>
93 #include <vector>
94+#ifdef __CYGWIN__
95+#include <stdarg.h>
96+#endif
97 #include "stdprt.h"
98 #include "xstack.h"
99 #include "xpath.h"

Subscribers

People subscribed via source and target branches

to status/vote changes: