You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(42) |
Nov
(368) |
Dec
(248) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(2) |
Feb
(207) |
Mar
(180) |
Apr
(9) |
May
(39) |
Jun
(9) |
Jul
(22) |
Aug
(56) |
Sep
(82) |
Oct
(113) |
Nov
(236) |
Dec
(219) |
2005 |
Jan
(119) |
Feb
(81) |
Mar
(53) |
Apr
(177) |
May
(2) |
Jun
(67) |
Jul
(17) |
Aug
(5) |
Sep
(53) |
Oct
(17) |
Nov
(122) |
Dec
(77) |
2006 |
Jan
(293) |
Feb
(16) |
Mar
(32) |
Apr
(14) |
May
(29) |
Jun
(6) |
Jul
|
Aug
|
Sep
(18) |
Oct
(28) |
Nov
|
Dec
(2) |
2007 |
Jan
(8) |
Feb
(19) |
Mar
(4) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(37) |
Oct
(1) |
Nov
(8) |
Dec
(25) |
2008 |
Jan
(1) |
Feb
(13) |
Mar
(17) |
Apr
(3) |
May
(2) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
(19) |
Dec
(16) |
2009 |
Jan
(6) |
Feb
(9) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Martin H. <mh...@us...> - 2005-07-24 14:23:49
|
Update of /cvsroot/opengtoolkit/serial/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31782/c_source Modified Files: lvserial.sln lvserial.vcproj Log Message: Linker options of the release version changed. The DLL is linked to the static run time library. Index: lvserial.sln =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/lvserial.sln,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lvserial.sln 23 Jul 2005 08:59:36 -0000 1.4 --- lvserial.sln 24 Jul 2005 14:23:40 -0000 1.5 *************** *** 2,7 **** Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lvserial", "lvserial.vcproj", "{1CD853E4-2CCB-499E-B9BF-9E653D6D3B54}" EndProject - Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "lvserial_driver", "lvserial_driver.vdproj", "{A7A15E11-98BB-4AFD-9569-BEBBF3F93320}" - EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dftables", "dftables.vcproj", "{0E49C1D0-1D2F-46C3-932F-6C8D08DA2FA0}" EndProject --- 2,5 ---- *************** *** 18,23 **** {1CD853E4-2CCB-499E-B9BF-9E653D6D3B54}.Release.ActiveCfg = Release|Win32 {1CD853E4-2CCB-499E-B9BF-9E653D6D3B54}.Release.Build.0 = Release|Win32 - {A7A15E11-98BB-4AFD-9569-BEBBF3F93320}.Debug.ActiveCfg = Debug - {A7A15E11-98BB-4AFD-9569-BEBBF3F93320}.Release.ActiveCfg = Release {0E49C1D0-1D2F-46C3-932F-6C8D08DA2FA0}.Debug.ActiveCfg = Debug|Win32 {0E49C1D0-1D2F-46C3-932F-6C8D08DA2FA0}.Debug.Build.0 = Debug|Win32 --- 16,19 ---- Index: lvserial.vcproj =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/lvserial.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lvserial.vcproj 23 Jul 2005 08:59:36 -0000 1.2 --- lvserial.vcproj 24 Jul 2005 14:23:40 -0000 1.3 *************** *** 80,84 **** <Tool Name="VCLinkerTool" ! AdditionalOptions="/NODEFAULTLIB:libcmt.lib" OutputFile="$(OutDir)/lvserial.dll" LinkIncremental="1" --- 80,84 ---- <Tool Name="VCLinkerTool" ! AdditionalOptions="/NODEFAULTLIB:msvcrt.lib" OutputFile="$(OutDir)/lvserial.dll" LinkIncremental="1" |
From: Martin H. <mh...@us...> - 2005-07-23 11:10:26
|
Update of /cvsroot/opengtoolkit/serial/lv_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3323/lv_source Modified Files: lvserial.dll Log Message: Version 0.0.5.2 Index: lvserial.dll =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/lvserial.dll,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsYYJN5Z and /tmp/cvsIeTeQH differ |
Update of /cvsroot/opengtoolkit/serial/lv_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31369/lv_source Modified Files: VI Tree - serial.vi comm break.vi comm buffer.vi comm bytes at port.vi comm clear break.vi comm close all.vi comm close.vi comm close2.vi comm clr dtr.vi comm clr rts.vi comm config.vi comm configure.vi comm control flags.vi comm control.vi comm error flags.vi comm flow control.vi comm flush flags.vi comm flush.vi comm get cts.vi comm get dsr.vi comm get handles.vi comm get port name.vi comm get ring.vi comm get rlsd.vi comm get user data.vi comm lock.vi comm modem status flags.vi comm modem status.vi comm open.vi comm options.vi comm read.vi comm receive bytes.vi comm refnum type enum.ctl comm refnum.ctl comm serial port list.vi comm set break.vi comm set dtr.vi comm set rts.vi comm set user data.vi comm set xoff.vi comm set xon.vi comm status flags.vi comm status.vi comm termination.vi comm termination2.vi comm timeout.vi comm timeout2.vi comm typecast handle to refnum.vi comm typecast refnum to handle.vi comm unlock.vi comm wait for [string pattern].vi comm wait for bytecount.vi comm wait for character.vi comm wait for string pattern.vi comm write and receive echo.vi comm write mode.vi comm write.vi Log Message: (1) made some cosmetic changes (2) places the licence string at the front panel where it was missing (3) removed unnecessary constant values on the diagrams like in comm get ring.vi. This is no longer necessary, because the shared library returns the correct default value. Index: comm modem status flags.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm modem status flags.vi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsj7UfCN and /tmp/cvsSiaOyo differ Index: comm clr rts.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm clr rts.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs9dQDxT and /tmp/cvs3fuuwu differ Index: comm control flags.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm control flags.vi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsjCIT1U and /tmp/cvsVsZd3v differ Index: comm set break.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm set break.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsqG7tz0 and /tmp/cvstWAVCB differ Index: comm receive bytes.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm receive bytes.vi,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsJhYfK3 and /tmp/cvsg7ZYPE differ Index: comm set xon.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm set xon.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsBh5674 and /tmp/cvsLTiagG differ Index: comm read.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm read.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsp40fYa and /tmp/cvsiyjA8L differ Index: comm status.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm status.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsmFGv0b and /tmp/cvsEP33cN differ Index: VI Tree - serial.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/VI Tree - serial.vi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsIrJH1h and /tmp/cvsFDrPhT differ Index: comm refnum.ctl =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm refnum.ctl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsUxiFpl and /tmp/cvsIoE7HW differ Index: comm set dtr.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm set dtr.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsi3yJxq and /tmp/cvsKht9R1 differ Index: comm config.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm config.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsScqSUt and /tmp/cvsTMGBh5 differ Index: comm refnum type enum.ctl =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm refnum type enum.ctl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsmtyOEu and /tmp/cvs2fzh35 differ Index: comm unlock.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm unlock.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsRjmGvx and /tmp/cvsOIkcW8 differ Index: comm modem status.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm modem status.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs9vWhJC and /tmp/cvs86bHbe differ Index: comm break.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm break.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsFizbCD and /tmp/cvsfLxD6e differ Index: comm get port name.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm get port name.vi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsGdpOBJ and /tmp/cvsXhJF8k differ Index: comm get handles.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm get handles.vi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsCyHtLM and /tmp/cvszs4mko differ Index: comm control.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm control.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsico9sN and /tmp/cvskvc93o differ Index: comm clear break.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm clear break.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsU4FfuQ and /tmp/cvsA5p86r differ Index: comm write mode.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm write mode.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs3nzS2V and /tmp/cvs5k6THx differ Index: comm get user data.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm get user data.vi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsrohPBP and /tmp/cvspjkVir differ Index: comm flush flags.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm flush flags.vi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsqr4IUS and /tmp/cvsWY9LDu differ Index: comm status flags.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm status flags.vi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsefGnwT and /tmp/cvsMxWphv differ Index: comm lock.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm lock.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs7BVOoW and /tmp/cvsLygMby differ Index: comm get rlsd.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm get rlsd.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsQ16y61 and /tmp/cvsOo7MVD differ Index: comm wait for character.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm wait for character.vi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsxFWgZ2 and /tmp/cvsLXcMQE differ Index: comm wait for bytecount.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm wait for bytecount.vi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsfUAD98 and /tmp/cvsHCLE3K differ Index: comm timeout2.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm timeout2.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsAj6Xoa and /tmp/cvsX6j9kM differ Index: comm close.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm close.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsoMqQKf and /tmp/cvsl86UIR differ Index: comm close all.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm close all.vi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsg37cAi and /tmp/cvsQOB2zU differ Index: comm typecast handle to refnum.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm typecast handle to refnum.vi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs7Awmvr and /tmp/cvs7BM3A3 differ Index: comm set xoff.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm set xoff.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsKQ30ku and /tmp/cvsFncEs6 differ Index: comm set user data.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm set user data.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvssxC3lv and /tmp/cvsVBhRv7 differ Index: comm error flags.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm error flags.vi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs6Vt0cy and /tmp/cvs1GJEoa differ Index: comm flush.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm flush.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvszlQ0RF and /tmp/cvsNzFb7h differ Index: comm termination.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm termination.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsMeIlMI and /tmp/cvsAois3k differ Index: comm flow control.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm flow control.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsohIzuJ and /tmp/cvsIT2HNl differ Index: comm get cts.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm get cts.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvseY0SyM and /tmp/cvsn0kXTo differ Index: comm bytes at port.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm bytes at port.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsmjNgbR and /tmp/cvsOg8jzt differ Index: comm options.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm options.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs7Ef4bX and /tmp/cvspIUyCz differ Index: comm set rts.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm set rts.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs9CFwVQ and /tmp/cvsRqP8nt differ Index: comm write.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm write.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs4tdajV and /tmp/cvs7EFBOx differ Index: comm termination2.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm termination2.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsgHe6nY and /tmp/cvsRZ1AVA differ Index: comm buffer.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm buffer.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs0nCo5Y and /tmp/cvsISpTEB differ Index: comm wait for [string pattern].vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm wait for [string pattern].vi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsHUW8A4 and /tmp/cvsLvSpdH differ Index: comm configure.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm configure.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsScVFa9 and /tmp/cvstYIoPL differ Index: comm get ring.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm get ring.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvszGq3va and /tmp/cvsMcu0cN differ Index: comm write and receive echo.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm write and receive echo.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsjACGud and /tmp/cvs9zvGdQ differ Index: comm open.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm open.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsEKmJqj and /tmp/cvsYFEUbW differ Index: comm serial port list.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm serial port list.vi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsWgLnck and /tmp/cvsA9lyZW differ Index: comm clr dtr.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm clr dtr.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsR5gabn and /tmp/cvsN26n0Z differ Index: comm timeout.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm timeout.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsDkK2Tu and /tmp/cvsOAGKM7 differ Index: comm close2.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm close2.vi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsrAJ9Fv and /tmp/cvsmChPA8 differ Index: comm get dsr.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm get dsr.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs83LrLE and /tmp/cvsGGvAKh differ Index: comm wait for string pattern.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm wait for string pattern.vi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvs2vvkCF and /tmp/cvsm0yTDi differ Index: comm typecast refnum to handle.vi =================================================================== RCS file: /cvsroot/opengtoolkit/serial/lv_source/comm typecast refnum to handle.vi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsaCSgxK and /tmp/cvsxUkCBn differ |
From: Martin H. <mh...@us...> - 2005-07-23 09:21:56
|
Update of /cvsroot/opengtoolkit/serial/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17315/c_source Modified Files: lvserial.h Log Message: small modification, so we can compile it with the C compiler without warnings. Index: lvserial.h =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/lvserial.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lvserial.h 29 Apr 2005 14:44:27 -0000 1.5 --- lvserial.h 23 Jul 2005 09:21:40 -0000 1.6 *************** *** 307,311 **** void CommFree(LPVOID ptr); void CommFreePortList(char **ports); ! long CommGetHandles(HANDLE **pHandles); long CommGetPortName(HANDLE hComm, char **ppszName, char **ppszOriginal); --- 307,311 ---- void CommFree(LPVOID ptr); void CommFreePortList(char **ports); ! long CommGetHandles(HANDLE **ppHandles, int *piSize); long CommGetPortName(HANDLE hComm, char **ppszName, char **ppszOriginal); *************** *** 388,392 **** void lvCommTermination2( HANDLE hComm, ! long *lTerminationMode, LStrHandle shTermination, pErrC pError); --- 388,392 ---- void lvCommTermination2( HANDLE hComm, ! long lTerminationMode, LStrHandle shTermination, pErrC pError); *************** *** 414,422 **** void lvCommSetUserData(HANDLE hComm, unsigned long ulUserData, pErrC pError); void lvCommGetUserData(HANDLE hComm, unsigned long *pulUserData, pErrC pError); ! void lvCommListPorts(LStrArrayHandle halsPorts, pErrC pError); void lvCommGetHandles(ULongArrayHandle *haulHandles, pErrC pError); void lvCommGetPortName(HANDLE hComm, LStrHandle shName, LStrHandle shOriginal, pErrC pError); - #if defined(__cplusplus) || defined(__cplusplus__) } --- 414,421 ---- void lvCommSetUserData(HANDLE hComm, unsigned long ulUserData, pErrC pError); void lvCommGetUserData(HANDLE hComm, unsigned long *pulUserData, pErrC pError); ! void lvCommListPorts(LStrArrayHandle *phalsPorts, pErrC pError); void lvCommGetHandles(ULongArrayHandle *haulHandles, pErrC pError); void lvCommGetPortName(HANDLE hComm, LStrHandle shName, LStrHandle shOriginal, pErrC pError); #if defined(__cplusplus) || defined(__cplusplus__) } |
From: Martin H. <mh...@us...> - 2005-07-23 09:19:35
|
Update of /cvsroot/opengtoolkit/serial/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16770/c_source Modified Files: lvserial.rc Log Message: Version 0.0.5.2 Index: lvserial.rc =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/lvserial.rc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lvserial.rc 29 Apr 2005 14:45:39 -0000 1.4 --- lvserial.rc 23 Jul 2005 09:19:26 -0000 1.5 *************** *** 54,59 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,0,5,1 ! PRODUCTVERSION 0,0,5,1 FILEFLAGSMASK 0x17L #ifdef _DEBUG --- 54,59 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,0,5,2 ! PRODUCTVERSION 0,0,5,2 FILEFLAGSMASK 0x17L #ifdef _DEBUG *************** *** 72,81 **** VALUE "CompanyName", "MH-Systemtechnik, www.mhst.de" VALUE "FileDescription", "Serial Port API" ! VALUE "FileVersion", "0, 0, 5, 1" VALUE "InternalName", "lvserial" VALUE "LegalCopyright", "Martin Henz Systemtechnik, 2004" VALUE "OriginalFilename", "lvserial.dll" VALUE "ProductName", "Serial Port API" ! VALUE "ProductVersion", "0, 0, 5, 1" END END --- 72,81 ---- VALUE "CompanyName", "MH-Systemtechnik, www.mhst.de" VALUE "FileDescription", "Serial Port API" ! VALUE "FileVersion", "0, 0, 5, 2" VALUE "InternalName", "lvserial" VALUE "LegalCopyright", "Martin Henz Systemtechnik, 2004" VALUE "OriginalFilename", "lvserial.dll" VALUE "ProductName", "Serial Port API" ! VALUE "ProductVersion", "0, 0, 5, 2" END END |
From: Martin H. <mh...@us...> - 2005-07-23 09:17:59
|
Update of /cvsroot/opengtoolkit/serial/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16476/c_source Added Files: lvserial.c Log Message: (1) changed to .c and defined the internally used functions as inline functions. (2)We do not add the "\\.\" string at the beginning of the port name if it already exists. (2) Allow the comma as separator between serial port options. (3) modified CommRead() and __CommRead() so it easier to read what the functions are doing. (4) changed the first regex in CommOptions() which is used to get the handshake mode and changed the regex for the complex form. (5) implemented the space parity option for the simple option form in CommOptions() --- NEW FILE: lvserial.c --- /* lvserial.cpp * * Serial Port API * * Martin Henz Systemtechnik, Germany, Stuttgart * E-Mail: mar...@mh... * Web: http://www.mhst.de * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public [...5839 lines suppressed...] } pComm = (PCOMM)ListGetElement(gpCommList, hComm); _ASSERT(pComm); if ((err = LStrPrintf(shName, (CStr)"%s", pComm->pszPort)) != noErr) { (*shName)->cnt = 0; (*shOriginal)->cnt = 0; lv_EasyErrBld(COMM_ERR_HANDLE, __FUNCTION__, pError); } if ((err = LStrPrintf(shOriginal, (CStr)"%s", pComm->pszOriginalName)) != noErr) { (*shName)->cnt = 0; (*shOriginal)->cnt = 0; lv_EasyErrBld(COMM_ERR_HANDLE, __FUNCTION__, pError); } } |
From: Martin H. <mh...@us...> - 2005-07-23 08:59:44
|
Update of /cvsroot/opengtoolkit/serial/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13191/c_source Modified Files: lvserial.ncb lvserial.sln lvserial.suo lvserial.vcproj Log Message: Changed compiler option from /Tp (compile as C++ code) to /Tc (compile as C code). Index: lvserial.sln =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/lvserial.sln,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lvserial.sln 12 Apr 2005 08:33:51 -0000 1.3 --- lvserial.sln 23 Jul 2005 08:59:36 -0000 1.4 *************** *** 2,5 **** --- 2,7 ---- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lvserial", "lvserial.vcproj", "{1CD853E4-2CCB-499E-B9BF-9E653D6D3B54}" EndProject + Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "lvserial_driver", "lvserial_driver.vdproj", "{A7A15E11-98BB-4AFD-9569-BEBBF3F93320}" + EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dftables", "dftables.vcproj", "{0E49C1D0-1D2F-46C3-932F-6C8D08DA2FA0}" EndProject *************** *** 16,19 **** --- 18,23 ---- {1CD853E4-2CCB-499E-B9BF-9E653D6D3B54}.Release.ActiveCfg = Release|Win32 {1CD853E4-2CCB-499E-B9BF-9E653D6D3B54}.Release.Build.0 = Release|Win32 + {A7A15E11-98BB-4AFD-9569-BEBBF3F93320}.Debug.ActiveCfg = Debug + {A7A15E11-98BB-4AFD-9569-BEBBF3F93320}.Release.ActiveCfg = Release {0E49C1D0-1D2F-46C3-932F-6C8D08DA2FA0}.Debug.ActiveCfg = Debug|Win32 {0E49C1D0-1D2F-46C3-932F-6C8D08DA2FA0}.Debug.Build.0 = Debug|Win32 Index: lvserial.vcproj =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/lvserial.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lvserial.vcproj 18 Mar 2005 23:23:06 -0000 1.1 --- lvserial.vcproj 23 Jul 2005 08:59:36 -0000 1.2 *************** *** 27,31 **** UsePrecompiledHeader="0" WarningLevel="3" ! Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="4"/> <Tool --- 27,31 ---- UsePrecompiledHeader="0" WarningLevel="3" ! Detect64BitPortabilityProblems="FALSE" DebugInformationFormat="4"/> <Tool *************** *** 74,78 **** UsePrecompiledHeader="0" WarningLevel="3" ! Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3"/> <Tool --- 74,78 ---- UsePrecompiledHeader="0" WarningLevel="3" ! Detect64BitPortabilityProblems="FALSE" DebugInformationFormat="3"/> <Tool *************** *** 111,134 **** Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> <File RelativePath="dftables.exe"> <FileConfiguration ! Name="Debug|Win32"> <Tool Name="VCCustomBuildTool" ! CommandLine="dftables chartables.c" Outputs="chartables.c"/> </FileConfiguration> </File> <File - RelativePath="get.c"> - </File> - <File RelativePath="listports.c"> </File> <File ! RelativePath="lv_error.cpp"> </File> <File ! RelativePath="lvserial.cpp"> </File> <File --- 111,142 ---- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> <File + RelativePath="chartables.c"> + </File> + <File RelativePath="dftables.exe"> <FileConfiguration ! Name="Debug|Win32" ! ExcludedFromBuild="TRUE"> <Tool Name="VCCustomBuildTool" ! CommandLine="dftables chartables.c ! " Outputs="chartables.c"/> </FileConfiguration> </File> <File RelativePath="listports.c"> </File> <File ! RelativePath="lv_error.c"> </File> <File ! RelativePath="lvserial.c"> ! <FileConfiguration ! Name="Release|Win32"> ! <Tool ! Name="VCCLCompilerTool" ! InlineFunctionExpansion="1"/> ! </FileConfiguration> </File> <File *************** *** 136,149 **** </File> <File ! RelativePath="maketables.c"> </File> <File ! RelativePath="pcre.c"> ! <FileConfiguration ! Name="Debug|Win32"> ! <Tool ! Name="VCCLCompilerTool" ! Detect64BitPortabilityProblems="FALSE"/> ! </FileConfiguration> </File> <File --- 144,202 ---- </File> <File ! RelativePath="pcre_compile.c"> </File> <File ! RelativePath="pcre_config.c"> ! </File> ! <File ! RelativePath="pcre_dfa_exec.c"> ! </File> ! <File ! RelativePath="pcre_exec.c"> ! </File> ! <File ! RelativePath="pcre_fullinfo.c"> ! </File> ! <File ! RelativePath="pcre_get.c"> ! </File> ! <File ! RelativePath="pcre_globals.c"> ! </File> ! <File ! RelativePath="pcre_info.c"> ! </File> ! <File ! RelativePath="pcre_maketables.c"> ! </File> ! <File ! RelativePath="pcre_ord2utf8.c"> ! </File> ! <File ! RelativePath="pcre_printint.c"> ! </File> ! <File ! RelativePath="pcre_refcount.c"> ! </File> ! <File ! RelativePath="pcre_study.c"> ! </File> ! <File ! RelativePath="pcre_tables.c"> ! </File> ! <File ! RelativePath="pcre_try_flipped.c"> ! </File> ! <File ! RelativePath="pcre_ucp_findchar.c"> ! </File> ! <File ! RelativePath="pcre_valid_utf8.c"> ! </File> ! <File ! RelativePath="pcre_version.c"> ! </File> ! <File ! RelativePath="pcre_xclass.c"> </File> <File *************** *** 157,164 **** </File> <File ! RelativePath="plist.cpp"> </File> <File ! RelativePath="study.c"> </File> </Filter> --- 210,232 ---- </File> <File ! RelativePath="plist.c"> </File> <File ! RelativePath="ucp.c"> ! </File> ! <File ! RelativePath="ucp_findchar.c"> ! <FileConfiguration ! Name="Debug|Win32" ! ExcludedFromBuild="TRUE"> ! <Tool ! Name="VCCLCompilerTool"/> ! </FileConfiguration> ! <FileConfiguration ! Name="Release|Win32" ! ExcludedFromBuild="TRUE"> ! <Tool ! Name="VCCLCompilerTool"/> ! </FileConfiguration> </File> </Filter> *************** *** 170,176 **** </File> <File - RelativePath="internal.h"> - </File> - <File RelativePath="listports.h"> </File> --- 238,241 ---- *************** *** 188,191 **** --- 253,259 ---- </File> <File + RelativePath="pcre_internal.h"> + </File> + <File RelativePath="pcreposix.h"> </File> *************** *** 197,209 **** </File> <File - RelativePath="ucp.c"> - <FileConfiguration - Name="Debug|Win32" - ExcludedFromBuild="TRUE"> - <Tool - Name="VCCLCompilerTool"/> - </FileConfiguration> - </File> - <File RelativePath="ucp.h"> </File> --- 265,268 ---- *************** *** 219,222 **** --- 278,287 ---- Name="VCCLCompilerTool"/> </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool"/> + </FileConfiguration> </File> <File *************** *** 228,231 **** --- 293,302 ---- Name="VCCLCompilerTool"/> </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + ExcludedFromBuild="TRUE"> + <Tool + Name="VCCLCompilerTool"/> + </FileConfiguration> </File> </Filter> Index: lvserial.suo =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/lvserial.suo,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvs0Iyin7 and /tmp/cvsYG0v6w differ Index: lvserial.ncb =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/lvserial.ncb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvstw7Qda and /tmp/cvsD7Gm1z differ |
From: Martin H. <mh...@us...> - 2005-07-23 08:50:43
|
Update of /cvsroot/opengtoolkit/serial/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12158/c_source Added Files: lv_error.c plist.c Log Message: changed to .c --- NEW FILE: lv_error.c --- /* lv_error.cpp * * LabVIEW Error Cluster Utilities * * Martin Henz Systemtechnik, Stuttgart * * */ #define _WIN32_WINNT 0x0500 #include <windows.h> #include <crtdbg.h> #include "lv_error.h" /* lv_ErrBld * * Setzt den Fehler oder Warnungsstatus des Error Clusters * * parameter * lfStatus neuer Fehlerstatus * lCode neuer Fehlercode * pszSource Fehlerquelle * pError ErrorCluster * */ void lv_ErrBld(LVBoolean lfStatus, long lCode, char *pszSource, pErrC pError) { //error pointer test _ASSERT(!DSCheckPtr(pError)); /* Der ErrorCluster wird nur verändert, wenn der aktuelle Status False ist, oder * wenn der aktuelle Errorcode 0 ist (für Warnungen) */ if ( pError->lfStatus == LVFALSE ) { _ASSERT(pszSource); if (lfStatus == LVTRUE || (pError->lCode == 0 && lCode != 0) ) { pError->lfStatus = lfStatus; pError->lCode = lCode; LStrPrintf(pError->shSource,(CStr)"%s", pszSource); } } } /* lv_ErrBldMsg * * Setzt den Fehler oder Warnungsstatus des Error Clusters * * parameter * lfStatus neuer Fehlerstatus * lCode neuer Fehlercode * pszSource Fehlerquelle * pszMsg Nachricht * pError ErrorCluster * */ void lv_ErrBldMsg(LVBoolean lfStatus, long lCode, char *pszSource, char *pszMsg, pErrC pError) { //error pointer test _ASSERT(!DSCheckPtr(pError)); /* Der ErrorCluster wird nur verändert, wenn der aktuelle Status False ist, oder * wenn der aktuelle Errorcode 0 ist (für Warnungen) */ if ( pError->lfStatus == LVFALSE ) { _ASSERT(pszSource); if (lfStatus == LVTRUE || (pError->lCode == 0 && lCode != 0) ) { pError->lfStatus = lfStatus; pError->lCode = lCode; LStrPrintf(pError->shSource,(CStr)"%s: %s", pszSource, pszMsg); } } } /* lv_ErrBldOpt * * Setzt den Fehler oder Warnungsstatus des Error Clusters * * parameter * lfStatus neuer Fehlerstatus * lCode neuer Fehlercode * pszSource Fehlerquelle * pszMsg Nachricht * pszOptMsg Optionale Nachricht * pError ErrorCluster */ void lv_ErrBldOpt(LVBoolean lfStatus, long lCode, char *pszSource, char *pszMsg, char *pszOptMsg, pErrC pError) { //error pointer test _ASSERT(!DSCheckPtr(pError)); /* Der ErrorCluster wird nur verändert, wenn der aktuelle Status False ist, oder * wenn der aktuelle Errorcode 0 ist (für Warnungen) */ if ( pError->lfStatus == LVFALSE ) { _ASSERT(pszSource); if (lfStatus == LVTRUE || (pError->lCode == 0 && lCode != 0) ) { pError->lfStatus = lfStatus; pError->lCode = lCode; if (pszMsg != NULL) { if (pszOptMsg != NULL) LStrPrintf(pError->shSource,(CStr)"%s: %s (%s)", pszSource, pszMsg, pszOptMsg); else LStrPrintf(pError->shSource,(CStr)"%s: %s", pszSource, pszMsg); } else { if (pszOptMsg != NULL) LStrPrintf(pError->shSource,(CStr)"%s (%s)", pszSource, pszOptMsg); else LStrPrintf(pError->shSource,(CStr)"%s", pszSource); } } } } /* lv_ErrBuilder * * Setzt den Fehler oder Warnungsstatus des Error Clusters * * parameter * lfStatus neuer Fehlerstatus * lCode neuer Fehlercode * pszSource Fehlerquelle * pszMsg Nachricht * pszOptMsg Optionale Nachricht * pszReason mögliche Ursache * pError ErrorCluster */ void lv_ErrBuilder(LVBoolean lfStatus, long lCode, char *pszSource, char *pszMsg, char *pszOptMsg, char *pszReason, pErrC pError) { //error pointer test _ASSERT(!DSCheckPtr(pError)); /* Der ErrorCluster wird nur verändert, wenn der aktuelle Status False ist, oder * wenn der aktuelle Errorcode 0 ist (für Warnungen) */ if ( pError->lfStatus == LVFALSE ) { _ASSERT(pszSource); if (lfStatus == LVTRUE || (pError->lCode == 0 && lCode != 0) ) { pError->lfStatus = lfStatus; pError->lCode = lCode; if (pszMsg != NULL) { if (pszOptMsg != NULL) { if (pszReason != NULL) LStrPrintf(pError->shSource,(CStr)"%s: %s (%s)<err>%s", pszSource, pszMsg, pszOptMsg, pszReason); else LStrPrintf(pError->shSource,(CStr)"%s: %s (%s)", pszSource, pszMsg, pszOptMsg); } else { if (pszReason != NULL) LStrPrintf(pError->shSource,(CStr)"%s: %s<err>%s", pszSource, pszMsg, pszReason); else LStrPrintf(pError->shSource,(CStr)"%s: %s", pszSource, pszMsg); } } else { if (pszOptMsg != NULL) { if (pszReason != NULL) LStrPrintf(pError->shSource,(CStr)"%s (%s)<err>%s", pszSource, pszOptMsg, pszReason); else LStrPrintf(pError->shSource,(CStr)"%s (%s)", pszSource, pszOptMsg); } else { if (pszReason != NULL) LStrPrintf(pError->shSource,(CStr)"%s<err>%s", pszSource, pszReason); else LStrPrintf(pError->shSource,(CStr)"%s", pszSource); } } } } } /* lv_EasyErrBld * * Setzt den Fehlerstatus des Error Clusters * * parameter * lCode neuer Fehlercode * pszSource Fehlerquelle * pError ErrorCluster */ void lv_EasyErrBld(long lCode, char *pszSource, pErrC pError) { //error pointer test _ASSERT(!DSCheckPtr(pError)); /* Der ErrorCluster wird nur verändert, wenn der aktuelle Status False ist, oder * wenn der aktuelle Errorcode 0 ist (für Warnungen) */ if ( pError->lfStatus == LVFALSE ) { _ASSERT(pszSource); if (lCode != 0) { pError->lfStatus = LVTRUE; pError->lCode = lCode; LStrPrintf(pError->shSource, (CStr)"%s", pszSource); } } } /* lv_WinErrBld * * Setzt den Windows Fehlerstatus des Error Clusters * * input * lCode neuer Fehlercode * pszSource Fehlerquelle * pError ErrorCluster * * output * error ErrorCluster */ void lv_WinErrBld(long lCode, char *pszSource, pErrC pError) { char * pszWinErrMsg; //error pointer test _ASSERT(!DSCheckPtr(pError)); /* Der ErrorCluster wird nur verändert, wenn der aktuelle Status False ist, oder * wenn der aktuelle Errorcode 0 ist (für Warnungen) */ if ( pError->lfStatus == LVFALSE ) { _ASSERT(pszSource); if (lCode != 0) { pError->lfStatus = LVTRUE; pError->lCode = lCode; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, lCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR) &pszWinErrMsg, 0, NULL); if (pszWinErrMsg != NULL) { LStrPrintf(pError->shSource, (CStr)"%s<err>%s", pszSource, pszWinErrMsg); LocalFree(pszWinErrMsg); } else LStrPrintf(pError->shSource, (CStr)"%s", pszSource); } } } /* lv_WarnOrErrBld * * Setzt den Fehlerstatus des Error Clusters. The error status will be set * for Error Codes lower than 60000. * * parameter * lCode neuer Fehlercode * pszSource Fehlerquelle * pError ErrorCluster * */ void lv_WarnOrErrBld(long lCode, char *pszSource, pErrC pError) { //error pointer test _ASSERT(!DSCheckPtr(pError)); /* Der ErrorCluster wird nur verändert, wenn der aktuelle Status False ist, oder * wenn der aktuelle Errorcode 0 ist (für Warnungen) */ if ( pError->lfStatus == LVFALSE ) { _ASSERT(pszSource); if (lCode != 0) { pError->lfStatus = lCode < 60000 ? LVTRUE : LVFALSE; pError->lCode = lCode; LStrPrintf(pError->shSource, (CStr)"%s", pszSource); } } } /* lv_LStrErrBld * * Setzt den Fehler oder Warnungsstatus des Error Clusters * * parameter * lfStatus neuer Fehlerstatus * lCode neuer Fehlercode * shSource Fehlerquelle * pError ErrorCluster */ void lv_LStrErrBld(LVBoolean *plfStatus, long lCode, LStrHandle shSource, pErrC pError) { //error pointer test _ASSERT(!DSCheckPtr(pError)); /* Der ErrorCluster wird nur verändert, wenn der aktuelle Status False ist, oder * wenn der aktuelle Errorcode 0 ist (für Warnungen) */ if ( pError->lfStatus == LVFALSE ) { _ASSERT(!DSCheckHandle(shSource)); if (*plfStatus == LVTRUE || (pError->lCode == 0 && lCode != 0)) { pError->lfStatus = *plfStatus; pError->lCode = lCode; LStrPrintf(pError->shSource, (CStr)"%H", shSource); } } } /* lv_LStrEasyErrBld * * Setzt den Fehlerstatus des Error Clusters * * parameter * lCode neuer Fehlercode * shSource Fehlerquelle * pError ErrorCluster */ void lv_LStrEasyErrBld(long lCode, LStrHandle shSource, pErrC pError) { //error pointer test _ASSERT(!DSCheckPtr(pError)); /* Der ErrorCluster wird nur verändert, wenn der aktuelle Status False ist, oder * wenn der aktuelle Errorcode 0 ist (für Warnungen) */ if ( pError->lfStatus == LVFALSE ) { _ASSERT(!DSCheckHandle(shSource)); if ( lCode != 0 ) { pError->lfStatus = LVTRUE; pError->lCode = lCode; LStrPrintf(pError->shSource, (CStr)"%H", shSource); } } } --- NEW FILE: plist.c --- /* plist.cpp * * Simple pList Implementation * * Martin Henz Systemtechnik, Stuttgart * */ #include <stdlib.h> #include "plist.h" #pragma pack(1) __inline PLIST InitializeList(PLIST pList); __inline PLINK GetPrevLink(PLINK pLink); __inline PLINK GetNextLink(PLINK pLink); __inline PLINK GetHeadOfList(PLIST pList); __inline PLINK GetTailOfList(PLIST pList); __inline void * GetElementPtr(PLINK pLink); __inline void SetElementPtr(PLINK pLink, void *pElement); __inline unsigned long GetListLength(PLIST pList); __inline PLINK AddToList(PLIST pList, PLINK pDstLink, PLINK pSrcLink); __inline PLINK AddToFrontOfList(PLIST pList, PLINK pLink); __inline PLINK AddToEndOfList(PLIST pList, PLINK pLink); __inline void AddLinkToLink(PLINK pDstLink, PLINK pSrcLink); __inline PLINK DeleteFromList(PLIST pList, PLINK pLink); __inline PLINK DeleteFromFrontOfList(PLIST pList); __inline PLINK DeleteFromEndOfList(PLIST pList); /* InitializeList * * Initializes a list * * parameter * pList list pointer * * return * list pointer */ __inline PLIST InitializeList(PLIST pList) { pList->pHead = (PLINK) 0L; pList->pTail = (PLINK) 0L; pList->ulLength = 0; return pList; } /* GetPrevLink * * Gets the previous link * * parameter * pLink link pointer * * return * the previous link */ __inline PLINK GetPrevLink(PLINK pLink) { return pLink->pPrev; } /* GetNextLink * * Gets the next link * * parameter * pLink link pointer * * return * the next link */ __inline PLINK GetNextLink(PLINK pLink) { return pLink->pNext; } /* GetHeadOfList * * Gets the head of the list * * parameter * pList list pointer * * return * the list head link */ __inline PLINK GetHeadOfList(PLIST pList) { return pList->pHead; } /* GetTailOfList * * Gets the tail of the list * * parameter * pList list pointer * * return * the list tail link */ __inline PLINK GetTailOfList(PLIST pList) { return pList->pTail; } /* GetElementPtr * * Gets the element data pointer * * parameter * pLink link * * return * element data pointer */ __inline void * GetElementPtr(PLINK pLink) { return pLink->pElement; } /* SetElementPtr * * Sets the element data pointer * * parameter * pLink link * pElement element data pointer */ __inline void SetElementPtr(PLINK pLink, void *pElement) { pLink->pElement = pElement; } /* GetListLength * * Gets the length of the list * * parameter * pLink link * * return * element data pointer */ __inline unsigned long GetListLength(PLIST pList) { return pList->ulLength; } /* AddLinkToLink * * Links two links together * * parameter * pDstLink destination link * pSrcLink source link */ __inline void AddLinkToLink(PLINK pDstLink, PLINK pSrcLink) { //Make the source link point at the destination link. pSrcLink->pPrev = pDstLink; pSrcLink->pNext = pDstLink->pNext; // Make the destination link point at the source link. pDstLink->pNext->pPrev = pSrcLink; pDstLink->pNext = pSrcLink; } /* AddToList * * Adds a link to the list. If the source link is NULL, the functions appends * the destination link at the end of the list. If the destination link is * NULL, the source link will be appended at the front of the list. If neither * source and destination link is NULL, it links them together. * * parameter * pList list pointer * DstLink destination link * SrcLink source link * * return * the added link pointer */ __inline PLINK AddToList(PLIST pList, PLINK pDstLink, PLINK pSrcLink) { //Grow the list length by one. pList->ulLength++; //If SrcLink is NULL then add DstLink to the end of the list. if ( pSrcLink == (PLINK) 0L ) { //If the tail pointer is NULL then the list is empty. if ( pList->pTail != (PLINK) 0L ) { AddLinkToLink(pList->pTail, pDstLink); } else { pDstLink->pPrev = pDstLink; pDstLink->pNext = pDstLink; pList->pHead = pDstLink; } return (pList->pTail = pDstLink); } //If DstLink is NULL then add SrcLink to the front of the list. if ( pDstLink == (PLINK) 0L ) { //If the head pointer is NULL then the list is empty. if ( pList->pHead != (PLINK) 0L ) { AddLinkToLink(pList->pHead, pSrcLink); } else { pSrcLink->pPrev = pSrcLink; pSrcLink->pNext = pSrcLink; pList->pTail = pSrcLink; } return (pList->pHead = pSrcLink); } //Neither pDstLink nor SrcLink is NULL so link them together. AddLinkToLink(pDstLink, pSrcLink); return pSrcLink; } /* DeleteFromList * * Deletes a link from the list * * parameter * pList list pointer * pLink link pointer * * return * the deleted link pointer */ __inline PLINK DeleteFromList(PLIST pList, PLINK pLink) { //If the list is empty then return NULL. if ( pList->ulLength != 0 ) { /* If the list length is not zero then we may need to fixup head and * tail pointers in the event we delete the first or last link, * respectively. */ if ( --pList->ulLength != 0 ) { // If we are deleting the front link then fixup the head pointer. if ( pList->pHead == pLink ) { pList->pHead = pList->pHead->pNext; } //If we are deleting the end link then fixup the tail pointer. if ( pList->pTail == pLink ) { pList->pTail = pList->pTail->pPrev; } // Now we can unlink this link from the list. pLink->pNext->pPrev = pLink->pPrev; pLink->pPrev->pNext = pLink->pNext; } else { // There is only one link on the list and we just deleted it. pList->pHead = (PLINK) 0L; pList->pTail = (PLINK) 0L; } return pLink; } return (PLINK) 0L; } /* AddToFrontOfList * * Adds a link at the front of the list * * parameter * pList list pointer * pLink link pointer * * return * the added link pointer */ __inline PLINK AddToFrontOfList(PLIST pList, PLINK pLink) { return AddToList(pList, (PLINK) 0L, pLink); } /* AddToEndOfList * * Adds a link at the end of the list * * parameter * pList list pointer * pLink link pointer * * return * the added link pointer */ __inline PLINK AddToEndOfList(PLIST pList, PLINK pLink) { return AddToList(pList, pLink, (PLINK) 0L); } /* DeleteFromFrontOfList * * Deletes a link from the front of the list * * parameter * pList list pointer * pLink link pointer * * return * the deleted link pointer */ __inline PLINK DeleteFromFrontOfList(PLIST pList) { return DeleteFromList(pList, GetHeadOfList(pList)); } /* DeleteFromEndOfList * * Deletes a link from the end of the list * * parameter * pList list pointer * pLink link pointer * * return * the deleted link pointer */ __inline PLINK DeleteFromEndOfList(PLIST pList) { return DeleteFromList(pList, GetTailOfList(pList)); } #pragma pack() /* ListCreate * * The function allocates the memory needed for a new list and initialises * the list as an empty list. * * parameter * * return * pointer to list */ PLIST ListCreate(void) { PLIST pList; if ( (pList = (PLIST)malloc(sizeof(LIST))) == NULL) return NULL; InitializeList(pList); return pList; } /* ListDispose * * Releases the momory allocated for the list * * parameter * pList list pointer * * return * 0 if no error or 1 if the pList argument is not valid */ int ListDispose(PLIST pList) { if (pList == NULL) return 1; InitializeList(pList); free(pList); return 0; } /* ListAppendElement * * Appends a new element at the end of the list. * * parameter * pList list pointer * pElement element data pointer * * return * element handle */ void * ListAppendElement(PLIST pList, void *pElement) { PLINK pLink; if (pList == NULL) return NULL; if ( (pLink = (PLINK)malloc(sizeof(LINK))) == NULL) return NULL; pLink->pElement = pElement; AddToEndOfList(pList, pLink); //return the element handle return pLink; } /* ListRemoveHandle * * Removes an element from the list * * parameter * pList list pointer * hElement element handle * * return * the removed elements data pointer * */ void * ListRemoveHandle(PLIST pList, void *hElement) { void *pElement; if (pList == NULL || hElement == NULL) return NULL; if (DeleteFromList(pList, (PLINK)hElement) == NULL) return NULL; pElement = ((PLINK)hElement)->pElement; ((PLINK)hElement)->pNext = NULL; ((PLINK)hElement)->pPrev = NULL; ((PLINK)hElement)->pElement = NULL; free(hElement); return pElement; } /* ListRemoveFirstElement * * Removes the first element of the list * * parameter * pList list pointer * * return * the removed element data pointer */ void * ListRemoveFirstElement(PLIST pList) { PLINK pLink; void *pElement; if (pList == NULL) return NULL; pLink = DeleteFromFrontOfList(pList); if (pLink != NULL) { pElement = pLink->pElement; pLink->pNext = NULL; pLink->pPrev = NULL; pLink->pElement = NULL; free(pLink); return pElement; } return NULL; } /* ListRemoveLastElement * * Removes the last element from the list * * parameter * pList list pointer * * return * the removes element data pointer */ void * ListRemoveLastElement(PLIST pList) { PLINK pLink; void *pElement; if (pList == NULL) return NULL; pLink = DeleteFromEndOfList(pList); if (pLink != NULL) { pElement = pLink->pElement; pLink->pNext = NULL; pLink->pPrev = NULL; pLink->pElement = NULL; free(pLink); return pElement; } return NULL; } /* ListGetElement * * Returns the elements data pointer referenced by the element handle * * parameter * pList list pointer * hElement element handle * * return * the elements data pointer */ void * ListGetElement(PLIST pList, void *hElement) { if (pList == NULL || hElement == NULL) return NULL; return ((PLINK)hElement)->pElement; } /* ListGetLength * * Retrieves the length of the list (number of elements in the list) * * parameter * pList list pointer * * return * ulLength of the list */ int ListGetLength(PLIST pList) { if (pList == NULL) return -1; return GetListLength(pList); } /* ListCheckHandle * * Checks an element handle * * parameter * pList list pointer * hElement element handle * * return * 0, if the handle is valid * 1, if the handle is not a valid element handle * in case of an error, the function returns a negative number */ int ListCheckHandle(PLIST pList, void *hElement) { PLINK pLink; unsigned long i; if (pList == NULL) return -1; for ( i = 0, pLink = GetHeadOfList(pList); i < GetListLength(pList); i++, pLink = GetNextLink(pLink)) { if (pLink == hElement) return 0; } return 1; } /* ListCheckElement * * Checks an element data pointer * * parameter * pList list pointer * pElement element data pointer * * return * 0, if the pointer is valid * 1, if the pointer is not a valid element handle * in case of an error, the function returns a negative number */ int ListCheckElement(PLIST pList, void *pElement) { PLINK pLink; unsigned long i; if (pList == NULL) return -1; for ( i = 0, pLink=GetHeadOfList(pList); i < GetListLength(pList); i++, pLink = GetNextLink(pLink)) { if (pLink->pElement == pElement) return 0; } return 1; } /* ListGetFirstElement * * Returns the first element of the list * * parameter * pList list pointer * * return * the elements data pointer * */ void * ListGetFirstElement(PLIST pList) { if (pList == NULL) return NULL; return (GetHeadOfList(pList))->pElement; } /* ListGetNextElement * * Returns the next element of the list * * parameter * pList list pointer * pElement element pointer * * return * the next elements data pointer * */ void * ListGetNextElement(PLIST pList, void *pElement) { PLINK pLink; unsigned long i; if (pList == NULL) return NULL; for ( i = 0, pLink=GetHeadOfList(pList); i < GetListLength(pList) && pLink->pElement != pElement; i++) { pLink = GetNextLink(pLink); } if (i >= GetListLength(pList)) return NULL; pLink = GetNextLink(pLink); return pLink->pElement; } /* ListGetFirstHandle * * Retruns the first element of the list * * parameter * pList list pointer * * return * the elements handle */ void * ListGetFirstHandle(PLIST pList) { if (pList == NULL) return NULL; return GetHeadOfList(pList); } /* ListGetNextHandle * * Returns the next handle of the list * * parameter * pList list pointer * hElement element handle * * return * the next elements handle * */ void * ListGetNextHandle(PLIST pList, void *hElement) { PLINK pLink; unsigned long i; if (pList == NULL) return NULL; for ( i = 0, pLink=GetHeadOfList(pList); i < GetListLength(pList) && pLink != hElement; i++) { pLink = GetNextLink(pLink); } if (i >= GetListLength(pList)) return NULL; pLink = GetNextLink(pLink); return pLink; } /* ListFindElement * * Searches for an element in the list * * parameter * pList list pointer * pElement element pointer * * return * element pointer, or NULL if not found */ void * ListFindElement(PLIST pList, void *pElement, int ( __cdecl *compare ) ( const void *, const void *) ) { PLINK pLink; unsigned long i; if (pList == NULL) return NULL; for ( i = 0, pLink = GetHeadOfList(pList); i < GetListLength(pList); i++, pLink = GetNextLink(pLink)) { if (compare(pElement, pLink->pElement) == 0) return pLink->pElement; } return NULL; } /* Compare Function template for ListFindElement int ElmCmp( char *arg1, MY_STRUCT arg2 ) { // Compare all of both strings: return _stricmp( arg1, arg2->struct_element ); } */ /* ListFindElmHandle * * Searches for an element in the list * * parameter * pList list pointer * pElement element pointer * * return * element handle, or NULL if not found */ void * ListFindElmHandle(PLIST pList, void *pElement, int ( __cdecl *compare ) ( const void *, const void *) ) { PLINK pLink; unsigned long i; if (pList == NULL) return NULL; for ( i = 0, pLink = GetHeadOfList(pList); i < GetListLength(pList); i++, pLink = GetNextLink(pLink)) { if (compare(pElement, pLink->pElement) == 0) return pLink; } return NULL; } /* Compare Function template for ListFindElmHandle int ElmCmp( char *arg1, MY_STRUCT arg2 ) { // Compare all of both strings: return _stricmp( arg1, arg2->struct_element ); } */ /* ListFindHandle * * Searches for an handle in the list * * parameter * pList list pointer * hElement element handle * * return * element handle or NULL if not found */ void * ListFindHandle(PLIST pList, void *hElement, int ( __cdecl *compare ) ( const void *, const void *) ) { PLINK pLink; unsigned long i; if (pList == NULL) return NULL; for ( i = 0, pLink = GetHeadOfList(pList); i < GetListLength(pList); i++, pLink = GetNextLink(pLink)) { if (compare(((PLINK)hElement)->pElement, pLink->pElement) == 0) return hElement; } return NULL; } /* Compare function template for ListFindHandle int HndlCmp( MY_STRUCT arg1, MY_STRUCT arg2 ) { // Compare all of both strings: return _stricmp( arg1->struct_element, arg2->struct_element ); } */ |
Update of /cvsroot/opengtoolkit/serial/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9616/c_source Modified Files: chartables.c config.h dftables.c dftables.exe dftables.vcproj pcre.h pcreposix.c pcreposix.h ucp.h Added Files: pcre_compile.c pcre_config.c pcre_dfa_exec.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c pcre_internal.h pcre_maketables.c pcre_ord2utf8.c pcre_printint.c pcre_refcount.c pcre_scanner.h pcre_study.c pcre_tables.c pcre_try_flipped.c pcre_ucp_findchar.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c ucp_findchar.c Log Message: Umstellung auf PCRE 6.1 --- NEW FILE: pcre_internal.h --- /************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Copyright (c) 1997-2005 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Cambridge nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----------------------------------------------------------------------------- */ /* This header contains definitions that are shared between the different modules, but which are not relevant to the exported API. This includes some functions whose names all begin with "_pcre_". */ /* Define DEBUG to get debugging output on stdout. */ /**** #define DEBUG ****/ /* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef inline, and there are *still* stupid compilers about that don't like indented pre-processor statements, or at least there were when I first wrote this. After all, it had only been about 10 years then... */ #ifdef DEBUG #define DPRINTF(p) printf p #else #define DPRINTF(p) /*nothing*/ #endif /* Get the definitions provided by running "configure" */ #include "config.h" /* Standard C headers plus the external interface definition. The only time setjmp and stdarg are used is when NO_RECURSE is set. */ #include <ctype.h> #include <limits.h> #include <setjmp.h> #include <stdarg.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #ifndef PCRE_SPY #define PCRE_DEFINITION /* Win32 __declspec(export) trigger for .dll */ #endif /* We need to have types that specify unsigned 16-bit and 32-bit integers. We cannot determine these outside the compilation (e.g. by running a program as part of "configure") because PCRE is often cross-compiled for use on other systems. Instead we make use of the maximum sizes that are available at preprocessor time in standard C environments. */ #if USHRT_MAX == 65535 typedef unsigned short pcre_uint16; #elif UINT_MAX == 65535 typedef unsigned int pcre_uint16; #else #error Cannot determine a type for 16-bit unsigned integers #endif #if UINT_MAX == 4294967295 typedef unsigned int pcre_uint32; #elif ULONG_MAX == 4294967295 typedef unsigned long int pcre_uint32; #else #error Cannot determine a type for 32-bit unsigned integers #endif /* All character handling must be done as unsigned characters. Otherwise there are problems with top-bit-set characters and functions such as isspace(). However, we leave the interface to the outside world as char *, because that should make things easier for callers. We define a short type for unsigned char to save lots of typing. I tried "uchar", but it causes problems on Digital Unix, where it is defined in sys/types, so use "uschar" instead. */ typedef unsigned char uschar; /* Include the public PCRE header */ #include "pcre.h" /* Include the (copy of) the public ucp header, changing the external name into a private one. This does no harm, even if we aren't compiling UCP support. */ #define ucp_findchar _pcre_ucp_findchar #include "ucp.h" /* When compiling for use with the Virtual Pascal compiler, these functions need to have their names changed. PCRE must be compiled with the -DVPCOMPAT option on the command line. */ #ifdef VPCOMPAT #define strncmp(s1,s2,m) _strncmp(s1,s2,m) #define memcpy(d,s,n) _memcpy(d,s,n) #define memmove(d,s,n) _memmove(d,s,n) #define memset(s,c,n) _memset(s,c,n) #else /* VPCOMPAT */ /* To cope with SunOS4 and other systems that lack memmove() but have bcopy(), define a macro for memmove() if HAVE_MEMMOVE is false, provided that HAVE_BCOPY is set. Otherwise, include an emulating function for those systems that have neither (there some non-Unix environments where this is the case). This assumes that all calls to memmove are moving strings upwards in store, which is the case in PCRE. */ #if ! HAVE_MEMMOVE #undef memmove /* some systems may have a macro */ #if HAVE_BCOPY #define memmove(a, b, c) bcopy(b, a, c) #else /* HAVE_BCOPY */ void * pcre_memmove(unsigned char *dest, const unsigned char *src, size_t n) { int i; dest += n; src += n; for (i = 0; i < n; ++i) *(--dest) = *(--src); } #define memmove(a, b, c) pcre_memmove(a, b, c) #endif /* not HAVE_BCOPY */ #endif /* not HAVE_MEMMOVE */ #endif /* not VPCOMPAT */ /* PCRE keeps offsets in its compiled code as 2-byte quantities (always stored in big-endian order) by default. These are used, for example, to link from the start of a subpattern to its alternatives and its end. The use of 2 bytes per offset limits the size of the compiled regex to around 64K, which is big enough for almost everybody. However, I received a request for an even bigger limit. For this reason, and also to make the code easier to maintain, the storing and loading of offsets from the byte string is now handled by the macros that are defined here. The macros are controlled by the value of LINK_SIZE. This defaults to 2 in the config.h file, but can be overridden by using -D on the command line. This is automated on Unix systems via the "configure" command. */ #if LINK_SIZE == 2 #define PUT(a,n,d) \ (a[n] = (d) >> 8), \ (a[(n)+1] = (d) & 255) #define GET(a,n) \ (((a)[n] << 8) | (a)[(n)+1]) #define MAX_PATTERN_SIZE (1 << 16) #elif LINK_SIZE == 3 #define PUT(a,n,d) \ (a[n] = (d) >> 16), \ (a[(n)+1] = (d) >> 8), \ (a[(n)+2] = (d) & 255) #define GET(a,n) \ (((a)[n] << 16) | ((a)[(n)+1] << 8) | (a)[(n)+2]) #define MAX_PATTERN_SIZE (1 << 24) #elif LINK_SIZE == 4 #define PUT(a,n,d) \ (a[n] = (d) >> 24), \ (a[(n)+1] = (d) >> 16), \ (a[(n)+2] = (d) >> 8), \ (a[(n)+3] = (d) & 255) #define GET(a,n) \ (((a)[n] << 24) | ((a)[(n)+1] << 16) | ((a)[(n)+2] << 8) | (a)[(n)+3]) #define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */ #else #error LINK_SIZE must be either 2, 3, or 4 #endif /* Convenience macro defined in terms of the others */ #define PUTINC(a,n,d) PUT(a,n,d), a += LINK_SIZE /* PCRE uses some other 2-byte quantities that do not change when the size of offsets changes. There are used for repeat counts and for other things such as capturing parenthesis numbers in back references. */ #define PUT2(a,n,d) \ a[n] = (d) >> 8; \ a[(n)+1] = (d) & 255 #define GET2(a,n) \ (((a)[n] << 8) | (a)[(n)+1]) #define PUT2INC(a,n,d) PUT2(a,n,d), a += 2 /* When UTF-8 encoding is being used, a character is no longer just a single byte. The macros for character handling generate simple sequences when used in byte-mode, and more complicated ones for UTF-8 characters. */ #ifndef SUPPORT_UTF8 #define GETCHAR(c, eptr) c = *eptr; #define GETCHARTEST(c, eptr) c = *eptr; #define GETCHARINC(c, eptr) c = *eptr++; #define GETCHARINCTEST(c, eptr) c = *eptr++; #define GETCHARLEN(c, eptr, len) c = *eptr; #define BACKCHAR(eptr) #else /* SUPPORT_UTF8 */ /* Get the next UTF-8 character, not advancing the pointer. This is called when we know we are in UTF-8 mode. */ #define GETCHAR(c, eptr) \ c = *eptr; \ if ((c & 0xc0) == 0xc0) \ { \ int gcii; \ int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ int gcss = 6*gcaa; \ c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ for (gcii = 1; gcii <= gcaa; gcii++) \ { \ gcss -= 6; \ c |= (eptr[gcii] & 0x3f) << gcss; \ } \ } /* Get the next UTF-8 character, testing for UTF-8 mode, and not advancing the pointer. */ #define GETCHARTEST(c, eptr) \ c = *eptr; \ if (utf8 && (c & 0xc0) == 0xc0) \ { \ int gcii; \ int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ int gcss = 6*gcaa; \ c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ for (gcii = 1; gcii <= gcaa; gcii++) \ { \ gcss -= 6; \ c |= (eptr[gcii] & 0x3f) << gcss; \ } \ } /* Get the next UTF-8 character, advancing the pointer. This is called when we know we are in UTF-8 mode. */ #define GETCHARINC(c, eptr) \ c = *eptr++; \ if ((c & 0xc0) == 0xc0) \ { \ int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ int gcss = 6*gcaa; \ c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ while (gcaa-- > 0) \ { \ gcss -= 6; \ c |= (*eptr++ & 0x3f) << gcss; \ } \ } /* Get the next character, testing for UTF-8 mode, and advancing the pointer */ #define GETCHARINCTEST(c, eptr) \ c = *eptr++; \ if (utf8 && (c & 0xc0) == 0xc0) \ { \ int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ int gcss = 6*gcaa; \ c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ while (gcaa-- > 0) \ { \ gcss -= 6; \ c |= (*eptr++ & 0x3f) << gcss; \ } \ } /* Get the next UTF-8 character, not advancing the pointer, incrementing length if there are extra bytes. This is called when we know we are in UTF-8 mode. */ #define GETCHARLEN(c, eptr, len) \ c = *eptr; \ if ((c & 0xc0) == 0xc0) \ { \ int gcii; \ int gcaa = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ \ int gcss = 6*gcaa; \ c = (c & _pcre_utf8_table3[gcaa]) << gcss; \ for (gcii = 1; gcii <= gcaa; gcii++) \ { \ gcss -= 6; \ c |= (eptr[gcii] & 0x3f) << gcss; \ } \ len += gcaa; \ } /* If the pointer is not at the start of a character, move it back until it is. Called only in UTF-8 mode. */ #define BACKCHAR(eptr) while((*eptr & 0xc0) == 0x80) eptr--; #endif /* In case there is no definition of offsetof() provided - though any proper Standard C system should have one. */ #ifndef offsetof #define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field)) #endif /* These are the public options that can change during matching. */ #define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL) /* Private options flags start at the most significant end of the four bytes, but skip the top bit so we can use ints for convenience without getting tangled with negative values. The public options defined in pcre.h start at the least significant end. Make sure they don't overlap! */ #define PCRE_FIRSTSET 0x40000000 /* first_byte is set */ #define PCRE_REQCHSET 0x20000000 /* req_byte is set */ #define PCRE_STARTLINE 0x10000000 /* start after \n for multiline */ #define PCRE_ICHANGED 0x08000000 /* i option changes within regex */ #define PCRE_NOPARTIAL 0x04000000 /* can't use partial with this regex */ /* Options for the "extra" block produced by pcre_study(). */ #define PCRE_STUDY_MAPPED 0x01 /* a map of starting chars exists */ /* Masks for identifying the public options that are permitted at compile time, run time, or study time, respectively. */ #define PUBLIC_OPTIONS \ (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \ PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \ PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE) #define PUBLIC_EXEC_OPTIONS \ (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \ PCRE_PARTIAL) #define PUBLIC_DFA_EXEC_OPTIONS \ (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \ PCRE_PARTIAL|PCRE_DFA_SHORTEST|PCRE_DFA_RESTART) #define PUBLIC_STUDY_OPTIONS 0 /* None defined */ /* Magic number to provide a small check against being handed junk. Also used to detect whether a pattern was compiled on a host of different endianness. */ #define MAGIC_NUMBER 0x50435245UL /* 'PCRE' */ /* Negative values for the firstchar and reqchar variables */ #define REQ_UNSET (-2) #define REQ_NONE (-1) /* The maximum remaining length of subject we are prepared to search for a req_byte match. */ #define REQ_BYTE_MAX 1000 /* Flags added to firstbyte or reqbyte; a "non-literal" item is either a variable-length repeat, or a anything other than literal characters. */ #define REQ_CASELESS 0x0100 /* indicates caselessness */ #define REQ_VARY 0x0200 /* reqbyte followed non-literal item */ /* Miscellaneous definitions */ typedef int BOOL; #define FALSE 0 #define TRUE 1 /* Escape items that are just an encoding of a particular data value. Note that ESC_n is defined as yet another macro, which is set in config.h to either \n (the default) or \r (which some people want). */ #ifndef ESC_e #define ESC_e 27 #endif #ifndef ESC_f #define ESC_f '\f' #endif #ifndef ESC_n #define ESC_n NEWLINE #endif #ifndef ESC_r #define ESC_r '\r' #endif /* We can't officially use ESC_t because it is a POSIX reserved identifier (presumably because of all the others like size_t). */ #ifndef ESC_tee #define ESC_tee '\t' #endif /* These are escaped items that aren't just an encoding of a particular data value such as \n. They must have non-zero values, as check_escape() returns their negation. Also, they must appear in the same order as in the opcode definitions below, up to ESC_z. There's a dummy for OP_ANY because it corresponds to "." rather than an escape sequence. The final one must be ESC_REF as subsequent values are used for \1, \2, \3, etc. There is are two tests in the code for an escape greater than ESC_b and less than ESC_Z to detect the types that may be repeated. These are the types that consume characters. If any new escapes are put in between that don't consume a character, that code will have to change. */ enum { ESC_A = 1, ESC_G, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, ESC_W, ESC_w, ESC_dum1, ESC_C, ESC_P, ESC_p, ESC_X, ESC_Z, ESC_z, ESC_E, ESC_Q, ESC_REF }; /* Flag bits and data types for the extended class (OP_XCLASS) for classes that contain UTF-8 characters with values greater than 255. */ #define XCL_NOT 0x01 /* Flag: this is a negative class */ #define XCL_MAP 0x02 /* Flag: a 32-byte map is present */ #define XCL_END 0 /* Marks end of individual items */ #define XCL_SINGLE 1 /* Single item (one multibyte char) follows */ #define XCL_RANGE 2 /* A range (two multibyte chars) follows */ #define XCL_PROP 3 /* Unicode property (one property code) follows */ #define XCL_NOTPROP 4 /* Unicode inverted property (ditto) */ /* Opcode table: OP_BRA must be last, as all values >= it are used for brackets that extract substrings. Starting from 1 (i.e. after OP_END), the values up to OP_EOD must correspond in order to the list of escapes immediately above. Note that whenever this list is updated, the two macro definitions that follow must also be updated to match. */ enum { OP_END, /* 0 End of pattern */ /* Values corresponding to backslashed metacharacters */ OP_SOD, /* 1 Start of data: \A */ OP_SOM, /* 2 Start of match (subject + offset): \G */ OP_NOT_WORD_BOUNDARY, /* 3 \B */ OP_WORD_BOUNDARY, /* 4 \b */ OP_NOT_DIGIT, /* 5 \D */ OP_DIGIT, /* 6 \d */ OP_NOT_WHITESPACE, /* 7 \S */ OP_WHITESPACE, /* 8 \s */ OP_NOT_WORDCHAR, /* 9 \W */ OP_WORDCHAR, /* 10 \w */ OP_ANY, /* 11 Match any character */ OP_ANYBYTE, /* 12 Match any byte (\C); different to OP_ANY for UTF-8 */ OP_NOTPROP, /* 13 \P (not Unicode property) */ OP_PROP, /* 14 \p (Unicode property) */ OP_EXTUNI, /* 15 \X (extended Unicode sequence */ OP_EODN, /* 16 End of data or \n at end of data: \Z. */ OP_EOD, /* 17 End of data: \z */ OP_OPT, /* 18 Set runtime options */ OP_CIRC, /* 19 Start of line - varies with multiline switch */ OP_DOLL, /* 20 End of line - varies with multiline switch */ OP_CHAR, /* 21 Match one character, casefully */ OP_CHARNC, /* 22 Match one character, caselessly */ OP_NOT, /* 23 Match anything but the following char */ OP_STAR, /* 24 The maximizing and minimizing versions of */ OP_MINSTAR, /* 25 all these opcodes must come in pairs, with */ OP_PLUS, /* 26 the minimizing one second. */ OP_MINPLUS, /* 27 This first set applies to single characters */ OP_QUERY, /* 28 */ OP_MINQUERY, /* 29 */ OP_UPTO, /* 30 From 0 to n matches */ OP_MINUPTO, /* 31 */ OP_EXACT, /* 32 Exactly n matches */ OP_NOTSTAR, /* 33 The maximizing and minimizing versions of */ OP_NOTMINSTAR, /* 34 all these opcodes must come in pairs, with */ OP_NOTPLUS, /* 35 the minimizing one second. */ OP_NOTMINPLUS, /* 36 This set applies to "not" single characters */ OP_NOTQUERY, /* 37 */ OP_NOTMINQUERY, /* 38 */ OP_NOTUPTO, /* 39 From 0 to n matches */ OP_NOTMINUPTO, /* 40 */ OP_NOTEXACT, /* 41 Exactly n matches */ OP_TYPESTAR, /* 42 The maximizing and minimizing versions of */ OP_TYPEMINSTAR, /* 43 all these opcodes must come in pairs, with */ OP_TYPEPLUS, /* 44 the minimizing one second. These codes must */ OP_TYPEMINPLUS, /* 45 be in exactly the same order as those above. */ OP_TYPEQUERY, /* 46 This set applies to character types such as \d */ OP_TYPEMINQUERY, /* 47 */ OP_TYPEUPTO, /* 48 From 0 to n matches */ OP_TYPEMINUPTO, /* 49 */ OP_TYPEEXACT, /* 50 Exactly n matches */ OP_CRSTAR, /* 51 The maximizing and minimizing versions of */ OP_CRMINSTAR, /* 52 all these opcodes must come in pairs, with */ OP_CRPLUS, /* 53 the minimizing one second. These codes must */ OP_CRMINPLUS, /* 54 be in exactly the same order as those above. */ OP_CRQUERY, /* 55 These are for character classes and back refs */ OP_CRMINQUERY, /* 56 */ OP_CRRANGE, /* 57 These are different to the three sets above. */ OP_CRMINRANGE, /* 58 */ OP_CLASS, /* 59 Match a character class, chars < 256 only */ OP_NCLASS, /* 60 Same, but the bitmap was created from a negative class - the difference is relevant only when a UTF-8 character > 255 is encountered. */ OP_XCLASS, /* 61 Extended class for handling UTF-8 chars within the class. This does both positive and negative. */ OP_REF, /* 62 Match a back reference */ OP_RECURSE, /* 63 Match a numbered subpattern (possibly recursive) */ OP_CALLOUT, /* 64 Call out to external function if provided */ OP_ALT, /* 65 Start of alternation */ OP_KET, /* 66 End of group that doesn't have an unbounded repeat */ OP_KETRMAX, /* 67 These two must remain together and in this */ OP_KETRMIN, /* 68 order. They are for groups the repeat for ever. */ /* The assertions must come before ONCE and COND */ OP_ASSERT, /* 69 Positive lookahead */ OP_ASSERT_NOT, /* 70 Negative lookahead */ OP_ASSERTBACK, /* 71 Positive lookbehind */ OP_ASSERTBACK_NOT, /* 72 Negative lookbehind */ OP_REVERSE, /* 73 Move pointer back - used in lookbehind assertions */ /* ONCE and COND must come after the assertions, with ONCE first, as there's a test for >= ONCE for a subpattern that isn't an assertion. */ OP_ONCE, /* 74 Once matched, don't back up into the subpattern */ OP_COND, /* 75 Conditional group */ OP_CREF, /* 76 Used to hold an extraction string number (cond ref) */ OP_BRAZERO, /* 77 These two must remain together and in this */ OP_BRAMINZERO, /* 78 order. */ OP_BRANUMBER, /* 79 Used for extracting brackets whose number is greater than can fit into an opcode. */ OP_BRA /* 80 This and greater values are used for brackets that extract substrings up to EXTRACT_BASIC_MAX. After that, use is made of OP_BRANUMBER. */ }; /* WARNING WARNING WARNING: There is an implicit assumption in pcre.c and study.c that all opcodes are less than 128 in value. This makes handling UTF-8 character sequences easier. */ /* The highest extraction number before we have to start using additional bytes. (Originally PCRE didn't have support for extraction counts highter than this number.) The value is limited by the number of opcodes left after OP_BRA, i.e. 255 - OP_BRA. We actually set it a bit lower to leave room for additional opcodes. */ #define EXTRACT_BASIC_MAX 100 /* This macro defines textual names for all the opcodes. These are used only for debugging. The macro is referenced only in pcre_printint.c. */ #define OP_NAME_LIST \ "End", "\\A", "\\G", "\\B", "\\b", "\\D", "\\d", \ "\\S", "\\s", "\\W", "\\w", "Any", "Anybyte", \ "notprop", "prop", "extuni", \ "\\Z", "\\z", \ "Opt", "^", "$", "char", "charnc", "not", \ "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \ "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \ "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \ "*", "*?", "+", "+?", "?", "??", "{", "{", \ "class", "nclass", "xclass", "Ref", "Recurse", "Callout", \ "Alt", "Ket", "KetRmax", "KetRmin", "Assert", "Assert not", \ "AssertB", "AssertB not", "Reverse", "Once", "Cond", "Cond ref",\ "Brazero", "Braminzero", "Branumber", "Bra" /* This macro defines the length of fixed length operations in the compiled regex. The lengths are used when searching for specific things, and also in the debugging printing of a compiled regex. We use a macro so that it can be defined close to the definitions of the opcodes themselves. As things have been extended, some of these are no longer fixed lenths, but are minima instead. For example, the length of a single-character repeat may vary in UTF-8 mode. The code that uses this table must know about such things. */ #define OP_LENGTHS \ 1, /* End */ \ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* \A, \G, \B, \B, \D, \d, \S, \s, \W, \w */ \ 1, 1, /* Any, Anybyte */ \ 2, 2, 1, /* NOTPROP, PROP, EXTUNI */ \ 1, 1, 2, 1, 1, /* \Z, \z, Opt, ^, $ */ \ 2, /* Char - the minimum length */ \ 2, /* Charnc - the minimum length */ \ 2, /* not */ \ /* Positive single-char repeats ** These are */ \ 2, 2, 2, 2, 2, 2, /* *, *?, +, +?, ?, ?? ** minima in */ \ 4, 4, 4, /* upto, minupto, exact ** UTF-8 mode */ \ /* Negative single-char repeats - only for chars < 256 */ \ 2, 2, 2, 2, 2, 2, /* NOT *, *?, +, +?, ?, ?? */ \ 4, 4, 4, /* NOT upto, minupto, exact */ \ /* Positive type repeats */ \ 2, 2, 2, 2, 2, 2, /* Type *, *?, +, +?, ?, ?? */ \ 4, 4, 4, /* Type upto, minupto, exact */ \ /* Character class & ref repeats */ \ 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */ \ 5, 5, /* CRRANGE, CRMINRANGE */ \ 33, /* CLASS */ \ 33, /* NCLASS */ \ 0, /* XCLASS - variable length */ \ 3, /* REF */ \ 1+LINK_SIZE, /* RECURSE */ \ 2+2*LINK_SIZE, /* CALLOUT */ \ 1+LINK_SIZE, /* Alt */ \ 1+LINK_SIZE, /* Ket */ \ 1+LINK_SIZE, /* KetRmax */ \ 1+LINK_SIZE, /* KetRmin */ \ 1+LINK_SIZE, /* Assert */ \ 1+LINK_SIZE, /* Assert not */ \ 1+LINK_SIZE, /* Assert behind */ \ 1+LINK_SIZE, /* Assert behind not */ \ 1+LINK_SIZE, /* Reverse */ \ 1+LINK_SIZE, /* Once */ \ 1+LINK_SIZE, /* COND */ \ 3, /* CREF */ \ 1, 1, /* BRAZERO, BRAMINZERO */ \ 3, /* BRANUMBER */ \ 1+LINK_SIZE /* BRA */ \ /* A magic value for OP_CREF to indicate the "in recursion" condition. */ #define CREF_RECURSE 0xffff /* Error code numbers. They are given names so that they can more easily be tracked. */ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, ERR10, ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, ERR20, ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR28, ERR29, ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47 }; /* The real format of the start of the pcre block; the index of names and the code vector run on as long as necessary after the end. We store an explicit offset to the name table so that if a regex is compiled on one host, saved, and then run on another where the size of pointers is different, all might still be well. For the case of compiled-on-4 and run-on-8, we include an extra pointer that is always NULL. For future-proofing, a few dummy fields were originally included - even though you can never get this planning right - but there is only one left now. NOTE NOTE NOTE: Because people can now save and re-use compiled patterns, any additions to this structure should be made at the end, and something earlier (e.g. a new flag in the options or one of the dummy fields) should indicate that the new fields are present. Currently PCRE always sets the dummy fields to zero. NOTE NOTE NOTE: */ typedef struct real_pcre { pcre_uint32 magic_number; pcre_uint32 size; /* Total that was malloced */ pcre_uint32 options; pcre_uint32 dummy1; /* For future use, maybe */ pcre_uint16 top_bracket; pcre_uint16 top_backref; pcre_uint16 first_byte; pcre_uint16 req_byte; pcre_uint16 name_table_offset; /* Offset to name table that follows */ pcre_uint16 name_entry_size; /* Size of any name items */ pcre_uint16 name_count; /* Number of name items */ pcre_uint16 ref_count; /* Reference count */ const unsigned char *tables; /* Pointer to tables or NULL for std */ const unsigned char *nullpad; /* NULL padding */ } real_pcre; /* The format of the block used to store data from pcre_study(). The same remark (see NOTE above) about extending this structure applies. */ typedef struct pcre_study_data { pcre_uint32 size; /* Total that was malloced */ pcre_uint32 options; uschar start_bits[32]; } pcre_study_data; /* Structure for passing "static" information around between the functions doing the compiling, so that they are thread-safe. */ typedef struct compile_data { const uschar *lcc; /* Points to lower casing table */ const uschar *fcc; /* Points to case-flipping table */ const uschar *cbits; /* Points to character type table */ const uschar *ctypes; /* Points to table of type maps */ const uschar *start_code; /* The start of the compiled code */ const uschar *start_pattern; /* The start of the pattern */ uschar *name_table; /* The name/number table */ int names_found; /* Number of entries so far */ int name_entry_size; /* Size of each entry */ int top_backref; /* Maximum back reference */ unsigned int backref_map; /* Bitmap of low back refs */ int req_varyopt; /* "After variable item" flag for reqbyte */ BOOL nopartial; /* Set TRUE if partial won't work */ } compile_data; /* Structure for maintaining a chain of pointers to the currently incomplete branches, for testing for left recursion. */ typedef struct branch_chain { struct branch_chain *outer; uschar *current; } branch_chain; /* Structure for items in a linked list that represents an explicit recursive call within the pattern. */ typedef struct recursion_info { struct recursion_info *prevrec; /* Previous recursion record (or NULL) */ int group_num; /* Number of group that was called */ const uschar *after_call; /* "Return value": points after the call in the expr */ const uschar *save_start; /* Old value of md->start_match */ int *offset_save; /* Pointer to start of saved offsets */ int saved_max; /* Number of saved offsets */ } recursion_info; /* When compiling in a mode that doesn't use recursive calls to match(), a structure is used to remember local variables on the heap. It is defined in pcre.c, close to the match() function, so that it is easy to keep it in step with any changes of local variable. However, the pointer to the current frame must be saved in some "static" place over a longjmp(). We declare the structure here so that we can put a pointer in the match_data structure. NOTE: This isn't used for a "normal" compilation of pcre. */ struct heapframe; /* Structure for passing "static" information around between the functions doing traditional NFA matching, so that they are thread-safe. */ typedef struct match_data { unsigned long int match_call_count; /* As it says */ unsigned long int match_limit;/* As it says */ int *offset_vector; /* Offset vector */ int offset_end; /* One past the end */ int offset_max; /* The maximum usable for return data */ const uschar *lcc; /* Points to lower casing table */ const uschar *ctypes; /* Points to table of type maps */ BOOL offset_overflow; /* Set if too many extractions */ BOOL notbol; /* NOTBOL flag */ BOOL noteol; /* NOTEOL flag */ BOOL utf8; /* UTF8 flag */ BOOL endonly; /* Dollar not before final \n */ BOOL notempty; /* Empty string match not wanted */ BOOL partial; /* PARTIAL flag */ BOOL hitend; /* Hit the end of the subject at some point */ const uschar *start_code; /* For use when recursing */ const uschar *start_subject; /* Start of the subject string */ const uschar *end_subject; /* End of the subject string */ const uschar *start_match; /* Start of this match attempt */ const uschar *end_match_ptr; /* Subject position at end match */ int end_offset_top; /* Highwater mark at end of match */ int capture_last; /* Most recent capture number */ int start_offset; /* The start offset value */ recursion_info *recursive; /* Linked list of recursion data */ void *callout_data; /* To pass back to callouts */ struct heapframe *thisframe; /* Used only when compiling for no recursion */ } match_data; /* A similar structure is used for the same purpose by the DFA matching functions. */ typedef struct dfa_match_data { const uschar *start_code; /* Start of the compiled pattern */ const uschar *start_subject; /* Start of the subject string */ const uschar *end_subject; /* End of subject string */ const uschar *tables; /* Character tables */ int moptions; /* Match options */ int poptions; /* Pattern options */ void *callout_data; /* To pass back to callouts */ } dfa_match_data; /* Bit definitions for entries in the pcre_ctypes table. */ #define ctype_space 0x01 #define ctype_letter 0x02 #define ctype_digit 0x04 #define ctype_xdigit 0x08 #define ctype_word 0x10 /* alphameric or '_' */ #define ctype_meta 0x80 /* regexp meta char or zero (end pattern) */ /* Offsets for the bitmap tables in pcre_cbits. Each table contains a set of bits for a class map. Some classes are built by combining these tables. */ #define cbit_space 0 /* [:space:] or \s */ #define cbit_xdigit 32 /* [:xdigit:] */ #define cbit_digit 64 /* [:digit:] or \d */ #define cbit_upper 96 /* [:upper:] */ #define cbit_lower 128 /* [:lower:] */ #define cbit_word 160 /* [:word:] or \w */ #define cbit_graph 192 /* [:graph:] */ #define cbit_print 224 /* [:print:] */ #define cbit_punct 256 /* [:punct:] */ #define cbit_cntrl 288 /* [:cntrl:] */ #define cbit_length 320 /* Length of the cbits table */ /* Offsets of the various tables from the base tables pointer, and total length. */ #define lcc_offset 0 #define fcc_offset 256 #define cbits_offset 512 #define ctypes_offset (cbits_offset + cbit_length) #define tables_length (ctypes_offset + 256) /* Layout of the UCP type table that translates property names into codes for ucp_findchar(). */ typedef struct { const char *name; int value; } ucp_type_table; /* Internal shared data tables. These are tables that are used by more than one of the exported public functions. They have to be "external" in the C sense, but are not part of the PCRE public API. The data for these tables is in the pcre_tables.c module. */ extern const int _pcre_utf8_table1[]; extern const int _pcre_utf8_table2[]; extern const int _pcre_utf8_table3[]; extern const uschar _pcre_utf8_table4[]; extern const int _pcre_utf8_table1_size; extern const ucp_type_table _pcre_utt[]; extern const int _pcre_utt_size; extern const uschar _pcre_default_tables[]; extern const uschar _pcre_OP_lengths[]; /* Internal shared functions. These are functions that are used by more than one of the exported public functions. They have to be "external" in the C sense, but are not part of the PCRE public API. */ extern int _pcre_ord2utf8(int, uschar *); extern void _pcre_printint(pcre *, FILE *); extern real_pcre * _pcre_try_flipped(const real_pcre *, real_pcre *, const pcre_study_data *, pcre_study_data *); extern int _pcre_ucp_findchar(const int, int *, int *); extern int _pcre_valid_utf8(const uschar *, int); extern BOOL _pcre_xclass(int, const uschar *); /* End of pcre_internal.h */ --- NEW FILE: pcre_exec.c --- /************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Copyright (c) 1997-2005 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the [...3593 lines suppressed...] if (using_temporary_offsets) { DPRINTF(("Freeing temporary memory\n")); (pcre_free)(match_block.offset_vector); } if (match_block.partial && match_block.hitend) { DPRINTF((">>>> returning PCRE_ERROR_PARTIAL\n")); return PCRE_ERROR_PARTIAL; } else { DPRINTF((">>>> returning PCRE_ERROR_NOMATCH\n")); return PCRE_ERROR_NOMATCH; } } /* End of pcre_exec.c */ Index: dftables.exe =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/dftables.exe,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsdbhJoI and /tmp/cvs4b9kUn differ --- NEW FILE: pcre_tables.c --- /************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Copyright (c) 1997-2005 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Cambridge nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----------------------------------------------------------------------------- */ /* This module contains some fixed tables that are used by more than one of the PCRE code modules. */ #include "pcre_internal.h" /* Table of sizes for the fixed-length opcodes. It's defined in a macro so that the definition is next to the definition of the opcodes in internal.h. */ const uschar _pcre_OP_lengths[] = { OP_LENGTHS }; /************************************************* * Tables for UTF-8 support * *************************************************/ /* These are the breakpoints for different numbers of bytes in a UTF-8 character. */ const int _pcre_utf8_table1[] = { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff}; const int _pcre_utf8_table1_size = sizeof(_pcre_utf8_table1)/sizeof(int); /* These are the indicator bits and the mask for the data bits to set in the first byte of a character, indexed by the number of additional bytes. */ const int _pcre_utf8_table2[] = { 0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc}; const int _pcre_utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01}; /* Table of the number of extra characters, indexed by the first character masked with 0x3f. The highest number for a valid UTF-8 character is in fact 0x3d. */ const uschar _pcre_utf8_table4[] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 }; /* This table translates Unicode property names into code values for the ucp_findchar() function. It is used by pcretest as well as by the library functions. */ const ucp_type_table _pcre_utt[] = { { "C", 128 + ucp_C }, { "Cc", ucp_Cc }, { "Cf", ucp_Cf }, { "Cn", ucp_Cn }, { "Co", ucp_Co }, { "Cs", ucp_Cs }, { "L", 128 + ucp_L }, { "Ll", ucp_Ll }, { "Lm", ucp_Lm }, { "Lo", ucp_Lo }, { "Lt", ucp_Lt }, { "Lu", ucp_Lu }, { "M", 128 + ucp_M }, { "Mc", ucp_Mc }, { "Me", ucp_Me }, { "Mn", ucp_Mn }, { "N", 128 + ucp_N }, { "Nd", ucp_Nd }, { "Nl", ucp_Nl }, { "No", ucp_No }, { "P", 128 + ucp_P }, { "Pc", ucp_Pc }, { "Pd", ucp_Pd }, { "Pe", ucp_Pe }, { "Pf", ucp_Pf }, { "Pi", ucp_Pi }, { "Po", ucp_Po }, { "Ps", ucp_Ps }, { "S", 128 + ucp_S }, { "Sc", ucp_Sc }, { "Sk", ucp_Sk }, { "Sm", ucp_Sm }, { "So", ucp_So }, { "Z", 128 + ucp_Z }, { "Zl", ucp_Zl }, { "Zp", ucp_Zp }, { "Zs", ucp_Zs } }; const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table); /* End of pcre_tables.c */ --- NEW FILE: pcre_ord2utf8.c --- /************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Copyright (c) 1997-2005 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Cambridge nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----------------------------------------------------------------------------- */ /* This file contains a private PCRE function that converts an ordinal character value into a UTF8 string. */ #include "pcre_internal.h" /************************************************* * Convert character value to UTF-8 * *************************************************/ /* This function takes an integer value in the range 0 - 0x7fffffff and encodes it as a UTF-8 character in 0 to 6 bytes. Arguments: cvalue the character value buffer pointer to buffer for result - at least 6 bytes long Returns: number of characters placed in the buffer */ EXPORT int _pcre_ord2utf8(int cvalue, uschar *buffer) { register int i, j; for (i = 0; i < _pcre_utf8_table1_size; i++) if (cvalue <= _pcre_utf8_table1[i]) break; buffer += i; for (j = i; j > 0; j--) { *buffer-- = 0x80 | (cvalue & 0x3f); cvalue >>= 6; } *buffer = _pcre_utf8_table2[i] | cvalue; return i + 1; } /* End of pcre_ord2utf8.c */ --- NEW FILE: pcre_valid_utf8.c --- /************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Copyright (c) 1997-2005 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Cambridge nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----------------------------------------------------------------------------- */ /* This module contains an internal function for validating UTF-8 character strings. */ #include "pcre_internal.h" /************************************************* * Validate a UTF-8 string * *************************************************/ /* This function is called (optionally) at the start of compile or match, to validate that a supposed UTF-8 string is actually valid. The early check means that subsequent code can assume it is dealing with a valid string. The check can be turned off for maximum performance, but the consequences of supplying an invalid string are then undefined. Arguments: string points to the string length length of string, or -1 if the string is zero-terminated Returns: < 0 if the string is a valid UTF-8 string >= 0 otherwise; the value is the offset of the bad byte */ EXPORT int _pcre_valid_utf8(const uschar *string, int length) { register const uschar *p; if (length < 0) { for (p = string; *p != 0; p++); length = p - string; } for (p = string; length-- > 0; p++) { register int ab; register int c = *p; if (c < 128) continue; if ((c & 0xc0) != 0xc0) return p - string; ab = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ if (length < ab) return p - string; length -= ab; /* Check top bits in the second byte */ if ((*(++p) & 0xc0) != 0x80) return p - string; /* Check for overlong sequences for each different length */ switch (ab) { /* Check for xx00 000x */ case 1: if ((c & 0x3e) == 0) return p - string; continue; /* We know there aren't any more bytes to check */ /* Check for 1110 0000, xx0x xxxx */ case 2: if (c == 0xe0 && (*p & 0x20) == 0) return p - string; break; /* Check for 1111 0000, xx00 xxxx */ case 3: if (c == 0xf0 && (*p & 0x30) == 0) return p - string; break; /* Check for 1111 1000, xx00 0xxx */ case 4: if (c == 0xf8 && (*p & 0x38) == 0) return p - string; break; /* Check for leading 0xfe or 0xff, and then for 1111 1100, xx00 00xx */ case 5: if (c == 0xfe || c == 0xff || (c == 0xfc && (*p & 0x3c) == 0)) return p - string; break; } /* Check for valid bytes after the 2nd, if any; all must start 10 */ while (--ab > 0) { if ((*(++p) & 0xc0) != 0x80) return p - string; } } return -1; } /* End of pcre_valid_utf8.c */ --- NEW FILE: pcre_globals.c --- /************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Copyright (c) 1997-2005 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Cambridge nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----------------------------------------------------------------------------- */ /* This module contains global variables that are exported by the PCRE library. PCRE is thread-clean and doesn't use any global variables in the normal sense. However, it calls memory allocation and freeing functions via the four indirections below, and it can optionally do callouts, using the fifth indirection. These values can be changed by the caller, but are shared between all threads. However, when compiling for Virtual Pascal, things are done differently, and global variables are not used (see pcre.in). */ #include "pcre_internal.h" #ifndef VPCOMPAT #ifdef __cplusplus extern "C" void *(*pcre_malloc)(size_t) = malloc; extern "C" void (*pcre_free)(void *) = free; extern "C" void *(*pcre_stack_malloc)(size_t) = malloc; extern "C" void (*pcre_stack_free)(void *) = free; extern "C" int (*pcre_callout)(pcre_callout_block *) = NULL; #else void *(*pcre_malloc)(size_t) = malloc; void (*pcre_free)(void *) = free; void *(*pcre_stack_malloc)(size_t) = malloc; void (*pcre_stack_free)(void *) = free; int (*pcre_callout)(pcre_callout_block *) = NULL; #endif #endif /* End of pcre_globals.c */ Index: ucp.h =================================================================== RCS file: /cvsroot/opengtoolkit/serial/c_source/ucp.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ucp.h 18 Mar 2005 23:23:06 -0000 1.1 --- ucp.h 23 Jul 2005 08:35:30 -0000 1.2 *************** *** 3,6 **** --- 3,10 ---- *************************************************/ + + #ifndef _UCP_H + #define _UCP_H + /* These are the character categories that are returned by ucp_findchar */ *************** *** 50,58 **** }; ! /* For use in PCRE we make this function static so that there is no conflict if ! PCRE is linked with an application that makes use of an external version - ! assuming an external version is ever released... */ ! static int ucp_findchar(const int, int *, int *); /* End of ucp.h */ --- 54,60 ---- }; ! extern int ucp_findchar(const int, int *, int *); ! #endif /* End of ucp.h */ --- NEW FILE: pcre_printint.c --- /************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel Copyright (c) 1997-2005 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the University of Cambridge nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----------------------------------------------------------------------------- */ /* This module contains an PCRE private debugging function for printing out the internal form of a compiled regular expression, along with some supporting local functions. */ #include "pcre_internal.h" static const char *OP_names[] = { OP_NAME_LIST }; /************************************************* * Print single- or multi-byte character * *************************************************/ static int print_char(FILE *f, uschar *ptr, BOOL utf8) { int c = *ptr; if (!utf8 || (c & 0xc0) != 0xc0) { if (isprint(c)) fprintf(f, "%c", c); else fprintf(f, "\\x%02x", c); return 0; } else { int i; int a = _pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */ int s = 6*a; c = (c & _pcre_utf8_table3[a]) << s; for (i = 1; i <= a; i++) { /* This is a check for malformed UTF-8; it should only occur if the sanity check has been turned off. Rather than swallow random bytes, just stop if we hit a bad one. Print it with \X instead of \x as an indication. */ if ((ptr[i] & 0xc0) != 0x80) { fprintf(f, "\\X{%x}", c); return i - 1; } /* The byte is OK */ s -= 6; c |= (ptr[i] & 0x3f) << s; } if (c < 128) fprintf(f, "\\x%02x", c); else fprintf(f, "\\x{%x}", c); return a; } } /************************************************* * Find Unicode property name * *************************************************/ static const char * get_ucpname(int property) { #ifdef SUPPORT_UCP int i; for (i = _pcre_utt_size; i >= 0; i--) { if (property == _pcre_utt[i].value) break; } return (i >= 0)? _pcre_utt[i].name : "??"; #else return "??"; #endif } /************************************************* * Print compiled regex * *************************************************/ /* Make this function work for a regex with integers either byte order. However, we assume that what we are passed is a compiled regex. */ EXPORT void _pcre_printint(pcre *external_re, FILE *f) { real_pcre *re = (real_pcre *)external_re; uschar *codestart, *code; BOOL utf8; unsigned int options = re->options; int offset = re->name_table_offset; int count = re->name_count; int size = re->name_entry_size; if (re->magic_number != MAGIC_NUMBER) { offset = ((offset << 8) & 0xff00) | ((offset >> 8) & 0xff); count = ((count << 8) & 0xff00) | ((count >> 8) & 0xff); size = ((size << 8) & 0xff00) | ((size >> 8) & 0xff); options = ((options << 24) & 0xff000000) | ((options << 8) & 0x00ff0000) | ((options >> 8) & 0x0000ff00) | ((options >> 24) & 0x000000ff); } code = codestart = (uschar *)re + offset + count * size; utf8 = (options & PCRE_UTF8) != 0; for(;;) { uschar *ccode; int c; int extra = 0; fprintf(f, "%3d ", (int)(code - codestart)); if (*code >= OP_BRA) { if (*code - OP_BRA > EXTRACT_BASIC_MAX) fprintf(f, "%3d Bra extra\n", GET(code, 1)); else fprintf(f, "%3d Bra %d\n", GET(code, 1), *code - OP_BRA); code += _pcre_OP_lengths[OP_BRA]; continue; } switch(*code) { case OP_END: fprintf(f, " %s\n", OP_names[*code]); fprintf(f, "-------------------------------------------------------------... [truncated message content] |
From: Jim K. <jk...@us...> - 2005-07-22 15:55:07
|
Update of /cvsroot/opengtoolkit/appcontrol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32235 Modified Files: change-log.txt Log Message: converted positions to I16 (signed) to fix the bug caused by items on the negative side of the grid origin Index: change-log.txt =================================================================== RCS file: /cvsroot/opengtoolkit/appcontrol/change-log.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** change-log.txt 27 Jan 2005 20:04:31 -0000 1.9 --- change-log.txt 22 Jul 2005 15:54:54 -0000 1.10 *************** *** 1,2 **** --- 1,8 ---- + -= UNRELEASED =- + + 2005-07-22 + [FIX] [BUG 1243167] Fit VI Window to Contents/Largest Decoration now works for items with negative coordinates. + + -= oglib_appcontrol-2.7-1.ogp =- |
From: Jim K. <jk...@us...> - 2005-07-22 15:49:49
|
Update of /cvsroot/opengtoolkit/appcontrol/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30847/source Modified Files: Fit VI window to Content.vi Fit VI window to Largest Dec.vi Log Message: converted positions to I16 (signed) to fix the bug caused by items on the negative side of the grid origin Index: Fit VI window to Largest Dec.vi =================================================================== RCS file: /cvsroot/opengtoolkit/appcontrol/source/Fit VI window to Largest Dec.vi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsXMeRPD and /tmp/cvshcLKV5 differ Index: Fit VI window to Content.vi =================================================================== RCS file: /cvsroot/opengtoolkit/appcontrol/source/Fit VI window to Content.vi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsv2GOOy and /tmp/cvssFmQA1 differ |
From: Rolf K. <lab...@us...> - 2005-06-30 21:11:09
|
Update of /cvsroot/opengtoolkit/pipe/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25649/c_source Modified Files: pipes.c Log Message: Fixed an include Index: pipes.c =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/c_source/pipes.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** pipes.c 30 Jun 2005 20:48:50 -0000 1.15 --- pipes.c 30 Jun 2005 21:10:59 -0000 1.16 *************** *** 22,26 **** */ #include "extcode.h" ! #include <windows.h> #ifdef _DEBUG --- 22,26 ---- */ #include "extcode.h" ! #include "hosttype.h" #ifdef _DEBUG |
From: Rolf K. <lab...@us...> - 2005-06-30 20:49:02
|
Update of /cvsroot/opengtoolkit/pipe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12531/source Modified Files: ogpipes.dll Log Message: More modifications to unix code and added an offset parameter to the read and write function Index: ogpipes.dll =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/source/ogpipes.dll,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsAsy1Ts and /tmp/cvsfFvkXl differ |
From: Rolf K. <lab...@us...> - 2005-06-30 20:49:02
|
Update of /cvsroot/opengtoolkit/pipe/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12531/tests Modified Files: Simple Pipe Test.vi Log Message: More modifications to unix code and added an offset parameter to the read and write function Index: Simple Pipe Test.vi =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/tests/Simple Pipe Test.vi,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvs2EoPIb and /tmp/cvsJqWjf5 differ |
From: Rolf K. <lab...@us...> - 2005-06-30 20:49:02
|
Update of /cvsroot/opengtoolkit/pipe/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12531/c_source Modified Files: pipes.c Log Message: More modifications to unix code and added an offset parameter to the read and write function Index: pipes.c =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/c_source/pipes.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pipes.c 28 Jun 2005 00:14:37 -0000 1.14 --- pipes.c 30 Jun 2005 20:48:50 -0000 1.15 *************** *** 46,51 **** uInt32 *fdErr, uInt32 *processID); MgErr LibAPI PipeClose(uInt32 fd); ! MgErr LibAPI PipeRead(uInt32 fd, uInt32 *bytesRead, LStrHandle data, uInt32 *eof); ! MgErr LibAPI PipeWrite(uInt32 fd, uInt32 *bytesWritten, LStrHandle data); #if defined(MSWin) --- 46,51 ---- uInt32 *fdErr, uInt32 *processID); MgErr LibAPI PipeClose(uInt32 fd); ! MgErr LibAPI PipeRead(uInt32 fd, uInt32 offset, uInt32 *bytesRead, LStrHandle data, uInt32 *eof); ! MgErr LibAPI PipeWrite(uInt32 fd, uInt32 offset, uInt32 *bytesWritten, LStrHandle data); #if defined(MSWin) *************** *** 139,146 **** { case kReadMode: ! mode = S_IRUSR; break; case kWriteMode: ! mode = S_IWUSR; break; } --- 139,149 ---- { case kReadMode: ! mode = O_RDONLY; break; case kWriteMode: ! mode = O_WRONLY; ! break; ! case kReadWriteMode: ! mode = O_RDWR; break; } *************** *** 155,159 **** { err = noErr; ! *fd = open(name, O_NONBLOCK); if (*fd < 0) { --- 158,162 ---- { err = noErr; ! *fd = open(name, mode | O_NONBLOCK); if (*fd < 0) { *************** *** 212,219 **** goto out; } - else - { - hChildStderr = GetStdHandle(STD_ERROR_HANDLE); - } /* Now create the child process. */ --- 215,218 ---- *************** *** 260,264 **** } ! MgErr LibAPI PipeRead(uInt32 fd, uInt32 *bytesRead, LStrHandle data, uInt32 *eof) { MgErr err = noErr; --- 259,263 ---- } ! MgErr LibAPI PipeRead(uInt32 fd, uInt32 offset, uInt32 *bytesRead, LStrHandle data, uInt32 *eof) { MgErr err = noErr; *************** *** 274,289 **** } - if (LStrLen(*data) < (int32)bytesReq) - { - err = NumericArrayResize(uB, 1, (UHandle*)&data, bytesReq); - if (err) - return err; - - /* We need to do this in LabVIEW 7.0 as otherwise the next - NumericArrayResize() will optimize out and only copy as much - characters into the new handle as it believes to be in the - array based on this value. */ - LStrLen(*data) = bytesReq; - } #if defined(MSWin) /* ReadFile blocks on any pipe not opened in overlapped mode and the anonymous --- 273,276 ---- *************** *** 306,310 **** { /* There are some bytes to read, so try to read as much as possible now! */ ! if (!ReadFile((HANDLE)fd, LStrBuf(*data), bytesReq, bytesRead, NULL)) { ret = GetLastError(); --- 293,297 ---- { /* There are some bytes to read, so try to read as much as possible now! */ ! if (!ReadFile((HANDLE)fd, LStrBuf(*data) + offset, bytesReq - offset, bytesRead, NULL)) { ret = GetLastError(); *************** *** 315,319 **** } #elif defined(Unix) ! *bytesRead = read((pipe_t)fd, LStrBuf(*data), bytesReq) if (*bytesRead < 0) { --- 302,306 ---- } #elif defined(Unix) ! *bytesRead = read((pipe_t)fd, LStrBuf(*data) + offset, bytesReq - offset) if (*bytesRead < 0) { *************** *** 331,335 **** } ! MgErr LibAPI PipeWrite(uInt32 fd, uInt32 *bytesWritten, LStrHandle data) { MgErr err = noErr; --- 318,322 ---- } ! MgErr LibAPI PipeWrite(uInt32 fd, uInt32 offset, uInt32 *bytesWritten, LStrHandle data) { MgErr err = noErr; *************** *** 338,355 **** return mgArgErr; - /* NULL terminate the LabVIEW string so that the API functions can use - them as a C string */ - *bytesWritten = LStrLen(*data); - err = NumericArrayResize(uB, 1, (UHandle*)&data, *bytesWritten + 1); - if (err) - return err; - LStrBuf(*data)[*bytesWritten] = 0; - #if defined(MSWin) ! if (!WriteFile((HANDLE)fd, LStrBuf(*data), *bytesWritten, bytesWritten, NULL) ) err = Win32ToLVErr(GetLastError()); #elif defined(Unix) ! *bytesWritten = write((pipe_t)fd, LStrBuf(*data), *bytesWritten); if (*bytesWritten < 0) { --- 325,334 ---- return mgArgErr; #if defined(MSWin) ! if (!WriteFile((HANDLE)fd, LStrBuf(*data) + offset, *bytesWritten - offset, bytesWritten, NULL) ) err = Win32ToLVErr(GetLastError()); #elif defined(Unix) ! *bytesWritten = write((pipe_t)fd, LStrBuf(*data) + offset, *bytesWritten - offset); if (*bytesWritten < 0) { *************** *** 377,381 **** /* Save the handle to the current STDIN. */ *stdIO = GetStdHandle(type); ! /* Create a pipe for the child process's standard IO. */ if (type == STANDARD_IN) --- 356,360 ---- /* Save the handle to the current STDIN. */ *stdIO = GetStdHandle(type); ! /* Create a pipe for the child process's standard IO. */ if (type == STANDARD_IN) *************** *** 390,394 **** if (ret) { ! /* Duplicate the write handle to the pipe so it is not inherited. */ ret = DuplicateHandle(GetCurrentProcess(), temp, GetCurrentProcess(), (HANDLE*)lvpipe, 0, --- 369,374 ---- if (ret) { ! /* Duplicate the LabVIEW side handle to the pipe so it is not ! inherited by the child process. */ ret = DuplicateHandle(GetCurrentProcess(), temp, GetCurrentProcess(), (HANDLE*)lvpipe, 0, *************** *** 432,438 **** if (dup2(*rmpipe, type) == type) { ! close(*rmpipe); ! i = fcntl(temp, F_GETFD, 0); ! fcntl(temp, F_SETFD, i | FD_CLOEXEC); if ((*lvpipe = (uInt32)fdopen(temp, type == STANDARD_IN ? "wb" : "rb")) == NULL) --- 412,418 ---- if (dup2(*rmpipe, type) == type) { ! close(*rmpipe); ! i = fcntl(temp, F_GETFD, 0); ! fcntl(temp, F_SETFD, i | FD_CLOEXEC); if ((*lvpipe = (uInt32)fdopen(temp, type == STANDARD_IN ? "wb" : "rb")) == NULL) *************** *** 444,448 **** } #else ! err = mgNotImplementd #endif return err; --- 424,428 ---- } #else ! err = mgNotImplemented #endif return err; *************** *** 461,464 **** --- 441,455 ---- } #elif defined(Unix) + if (rmpipe) + close(rmpipe); + fcntl(stdIO->handle, F_SETFD, stdIO->flags); + dup2(stdIO->handle, type); + if (err) + { + close(*(pipe_t*)lvpipe); + *lvpipe = 0; + } + + #else return mgNotImplementd *************** *** 485,491 **** siStartInfo.dwFlags |= STARTF_USESHOWWINDOW; siStartInfo.wShowWindow = SW_HIDE; ! siStartInfo.hStdInput = stdIn; ! siStartInfo.hStdOutput = stdOut; ! siStartInfo.hStdError = stdErr; /* Create the child process. */ --- 476,491 ---- siStartInfo.dwFlags |= STARTF_USESHOWWINDOW; siStartInfo.wShowWindow = SW_HIDE; ! if (stdIn) ! siStartInfo.hStdInput = stdIn; ! else ! siStartInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE); ! if (stdOut) ! siStartInfo.hStdOutput = stdOut; ! else ! siStartInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); ! if (stdErr) ! siStartInfo.hStdError = stdErr; ! else ! siStartInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE); /* Create the child process. */ *************** *** 638,641 **** --- 638,642 ---- static struct errentry errtable[] = { {EINVAL, mgArgErr }, + {ENXIO, fNotFound }, {ENOENT, fNotFound }, {EMFILE, fTMFOpen }, |
From: Rolf K. <lab...@us...> - 2005-06-30 20:49:02
|
Update of /cvsroot/opengtoolkit/pipe/source/ogpipe.llb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12531/source/ogpipe.llb Modified Files: OGPIPE Read From Pipe.vi OGPIPE Write To Pipe.vi Log Message: More modifications to unix code and added an offset parameter to the read and write function Index: OGPIPE Read From Pipe.vi =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/source/ogpipe.llb/OGPIPE Read From Pipe.vi,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsX65Yfe and /tmp/cvsX5yP96 differ Index: OGPIPE Write To Pipe.vi =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/source/ogpipe.llb/OGPIPE Write To Pipe.vi,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsBTBsrf and /tmp/cvsg7Ltn8 differ |
From: Rolf K. <lab...@us...> - 2005-06-28 00:27:46
|
Update of /cvsroot/opengtoolkit/pipe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25131 Modified Files: ogpipe 61.spec ogpipe.ogbld ogpipe.spec Log Message: Changed library name to ogpipes to avoid possible naming conflicts Index: ogpipe.ogbld =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/ogpipe.ogbld,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ogpipe.ogbld 12 Jun 2005 21:24:13 -0000 1.2 --- ogpipe.ogbld 28 Jun 2005 00:27:37 -0000 1.3 *************** *** 83,85 **** OverwriteExisting=TRUE FollowVIDirHierarchy=FALSE ! SourceFile 1=pipes.* --- 83,85 ---- OverwriteExisting=TRUE FollowVIDirHierarchy=FALSE ! SourceFile 1=ogpipes.* Index: ogpipe 61.spec =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/ogpipe 61.spec,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ogpipe 61.spec 12 Jun 2005 23:46:57 -0000 1.1 --- ogpipe 61.spec 28 Jun 2005 00:27:37 -0000 1.2 *************** *** 60,64 **** Num Files=8 ! File 0=pipes.dll File 1=ogpipe.llb/OGPIPE - VI TREE__ogtk.vi File 2=ogpipe.llb/OGPIPE Close Pipe__ogtk.vi --- 60,64 ---- Num Files=8 ! File 0=ogpipes.dll File 1=ogpipe.llb/OGPIPE - VI TREE__ogtk.vi File 2=ogpipe.llb/OGPIPE Close Pipe__ogtk.vi Index: ogpipe.spec =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/ogpipe.spec,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ogpipe.spec 12 Jun 2005 23:45:28 -0000 1.4 --- ogpipe.spec 28 Jun 2005 00:27:37 -0000 1.5 *************** *** 60,64 **** Num Files=8 ! File 0=pipes.dll File 1=ogpipe.llb/OGPIPE - VI TREE__ogtk.vi File 2=ogpipe.llb/OGPIPE Close Pipe__ogtk.vi --- 60,64 ---- Num Files=8 ! File 0=ogpipes.dll File 1=ogpipe.llb/OGPIPE - VI TREE__ogtk.vi File 2=ogpipe.llb/OGPIPE Close Pipe__ogtk.vi |
From: Rolf K. <lab...@us...> - 2005-06-28 00:24:49
|
Update of /cvsroot/opengtoolkit/pipe/source/ogpipe.llb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23216/source/ogpipe.llb Modified Files: OGPIPE Close Pipe.vi OGPIPE Open Pipe.vi OGPIPE Open System Command.vi OGPIPE Read From Pipe.vi OGPIPE Write To Pipe.vi Log Message: Changed library name to ogpipes to avoid possible naming conflicts Index: OGPIPE Open Pipe.vi =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/source/ogpipe.llb/OGPIPE Open Pipe.vi,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsA6xCUc and /tmp/cvsG3P6JH differ Index: OGPIPE Read From Pipe.vi =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/source/ogpipe.llb/OGPIPE Read From Pipe.vi,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsvZWqsl and /tmp/cvsTAFZnQ differ Index: OGPIPE Write To Pipe.vi =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/source/ogpipe.llb/OGPIPE Write To Pipe.vi,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvs3xzS5y and /tmp/cvscfkj83 differ Index: OGPIPE Close Pipe.vi =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/source/ogpipe.llb/OGPIPE Close Pipe.vi,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsEbl5iG and /tmp/cvsOPC9pb differ Index: OGPIPE Open System Command.vi =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/source/ogpipe.llb/OGPIPE Open System Command.vi,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsgNRBfJ and /tmp/cvsJQmgqe differ |
From: Rolf K. <lab...@us...> - 2005-06-28 00:24:11
|
Update of /cvsroot/opengtoolkit/pipe/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23216/source Added Files: ogpipes.dll Removed Files: pipes.dll Log Message: Changed library name to ogpipes to avoid possible naming conflicts --- NEW FILE: ogpipes.dll --- (This appears to be a binary file; contents omitted.) --- pipes.dll DELETED --- |
From: Rolf K. <lab...@us...> - 2005-06-28 00:22:38
|
Update of /cvsroot/opengtoolkit/pipe/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22639/c_source Modified Files: pipes.dsp pipes.rc Log Message: Changed library name to ogpipes to avoid possible naming conflicts Index: pipes.rc =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/c_source/pipes.rc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pipes.rc 9 Apr 2004 22:56:05 -0000 1.1 --- pipes.rc 28 Jun 2005 00:22:24 -0000 1.2 *************** *** 23,27 **** VALUE "ProductName", "ogpipes.dll\0" VALUE "Comments","LabVIEW support library to implement pipe operations on Windows\0" ! VALUE "LegalCopyright", "(C) 2004 Rolf Kalbermatter\0" END END --- 23,27 ---- VALUE "ProductName", "ogpipes.dll\0" VALUE "Comments","LabVIEW support library to implement pipe operations on Windows\0" ! VALUE "LegalCopyright", "(C) 2004,2005 Rolf Kalbermatter\0" END END Index: pipes.dsp =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/c_source/pipes.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pipes.dsp 9 Apr 2004 22:56:05 -0000 1.3 --- pipes.dsp 28 Jun 2005 00:22:22 -0000 1.4 *************** *** 54,58 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib labview.lib /nologo /dll /machine:I386 /nodefaultlib:"msvcrt" /libpath:"..\..\cintools" !ELSEIF "$(CFG)" == "pipes - Win32 Debug" --- 54,58 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib labview.lib /nologo /dll /machine:I386 /nodefaultlib:"msvcrt" /out:"Release/ogpipes.dll" /libpath:"..\..\cintools" !ELSEIF "$(CFG)" == "pipes - Win32 Debug" *************** *** 80,84 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib labview.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /pdbtype:sept /libpath:"..\..\cintools" # SUBTRACT LINK32 /nodefaultlib --- 80,84 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib labview.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"msvcrt" /out:"Debug/ogpipes.dll" /pdbtype:sept /libpath:"..\..\cintools" # SUBTRACT LINK32 /nodefaultlib |
From: Rolf K. <lab...@us...> - 2005-06-28 00:14:51
|
Update of /cvsroot/opengtoolkit/pipe/c_source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18993/c_source Modified Files: pipes.c Log Message: Made Linux part of code look more like what it is going to be. Refactored Windows code to make it somewhat easier to read. Index: pipes.c =================================================================== RCS file: /cvsroot/opengtoolkit/pipe/c_source/pipes.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pipes.c 13 Jun 2005 08:48:35 -0000 1.13 --- pipes.c 28 Jun 2005 00:14:37 -0000 1.14 *************** *** 33,37 **** #define LibAPI __declspec(dllexport) __cdecl #else ! #define LibAPI static #endif --- 33,37 ---- #define LibAPI __declspec(dllexport) __cdecl #else ! #define LibAPI __declspec(dllimport) __cdecl #endif *************** *** 50,56 **** #if defined(MSWin) ! static MgErr CreateChildProcess(LPSTR cmdline, HANDLE stdIn, HANDLE stdOut, HANDLE stdErr, DWORD *pid); static MgErr Win32ToLVErr(DWORD error); #elif defined (Unix) static MgErr UnixToLVErr(int32 errno); #elif defined (Mac) --- 50,67 ---- #if defined(MSWin) ! #define STANDARD_IN STD_INPUT_HANDLE ! #define STANDARD_OUT STD_OUTPUT_HANDLE ! #define STANDARD_ERR STD_ERROR_HANDLE ! typedef HANDLE std_handle; ! typedef HANDLE pipe_handle; static MgErr Win32ToLVErr(DWORD error); #elif defined (Unix) + #define STANDARD_IN 0 + #define STANDARD_OUT 1 + #define STANDARD_ERR 2 + + typedef struct file_ref std_handle; + typedef int pipe_handle; + static MgErr UnixToLVErr(int32 errno); #elif defined (Mac) *************** *** 58,61 **** --- 69,77 ---- #endif + static MgErr RedirectStandardIO(int32 type, std_handle *stdIO, pipe_handle *rmpipe, uInt32 *lvpipe); + static MgErr RestoreStandardIO(int32 type, std_handle *stdIO, pipe_handle rmpipe, uInt32 *lvpipe, MgErr err); + static MgErr CreateChildProcess(LPSTR cmdline, pipe_handle stdIn, pipe_handle stdOut, pipe_handle stdErr, uInt32 *pid); + + MgErr LibAPI PipeOpen(CStr name, uInt16 mode, uInt32 *fd) { *************** *** 64,67 **** --- 80,86 ---- HANDLE handle; DWORD dwMode; + #elif defined(Unix) + mode_t mode; + #endif DebugBreaking(); *************** *** 70,73 **** --- 89,93 ---- return mgArgErr; + #if defined(MSWin) if (WaitNamedPipe(name, 1000)) { *************** *** 116,124 **** #elif defined(Unix) - mode_t mode; - - if (mode > kWriteMode) - return mgArgErr; - switch (mode) { --- 136,139 ---- *************** *** 161,169 **** MgErr err = dvOpenErr; #if defined(MSWin) - BOOL ret; SECURITY_ATTRIBUTES saAttr = { 0 }; ! HANDLE hSaveStdout = 0L, hChildStdoutRd = 0L, hChildStdoutWr = 0L; ! HANDLE hSaveStdin = 0L, hChildStdinRd = 0L, hChildStdinWr = 0L; ! HANDLE hSaveStderr = 0L, hChildStderrRd = 0L, hChildStderrWr = 0L; if ((mode > kReadWriteMode) || --- 176,187 ---- MgErr err = dvOpenErr; #if defined(MSWin) SECURITY_ATTRIBUTES saAttr = { 0 }; ! HANDLE hSaveStdout = 0L, hChildStdout = 0L; ! HANDLE hSaveStdin = 0L, hChildStdin = 0L; ! HANDLE hSaveStderr = 0L, hChildStderr = 0L; ! #elif defined(Unix) ! std_handle hSaveStdout = 0L, hSaveStdin = 0L, hSaveStderr = 0L; ! pipe_handle hChildStdout = 0L, hChildStdin = 0L, hChildStderr = 0L; ! #endif if ((mode > kReadWriteMode) || *************** *** 174,203 **** DebugBreaking(); - saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); - saAttr.lpSecurityDescriptor = NULL; - saAttr.bInheritHandle = TRUE; - if (mode == kReadMode || mode == kReadWriteMode) { ! /* Save the handle to the current STDIN. */ ! hSaveStdin = GetStdHandle(STD_INPUT_HANDLE); ! ! /* Create a pipe for the child process's STDIN. */ ! ret = CreatePipe(&hChildStdinRd, &hChildStdinWr, &saAttr, 0); ! if (ret) ! { ! /* Set the read handle to the pipe to be STDIN. */ ! ret = SetStdHandle(STD_INPUT_HANDLE, hChildStdinRd); ! if (ret) ! { ! /* Duplicate the write handle to the pipe so it is not inherited. */ ! ret = DuplicateHandle(GetCurrentProcess(), hChildStdinWr, ! GetCurrentProcess(), (HANDLE*)fdIn, 0, ! FALSE, DUPLICATE_SAME_ACCESS); ! } ! CloseHandle(hChildStdinWr); ! } ! ! if (!ret) goto out; } --- 192,199 ---- DebugBreaking(); if (mode == kReadMode || mode == kReadWriteMode) { ! err = RedirectStandardIO(STANDARD_IN, &hSaveStdin, &hChildStdin, fdIn); ! if (err) goto out; } *************** *** 205,228 **** if (mode == kWriteMode || mode == kReadWriteMode) { ! /* Save the handle to the current STDOUT. */ ! hSaveStdout = GetStdHandle(STD_OUTPUT_HANDLE); ! ! /* Create a pipe for the child process's STDOUT. */ ! ret = CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &saAttr, 0); ! if (ret) ! { ! /* Set the write handle to the pipe to be STDOUT. */ ! ret = SetStdHandle(STD_OUTPUT_HANDLE, hChildStdoutWr); ! if (ret) ! { ! /* Create noninheritable read handle and close the inheritable read handle. */ ! ret = DuplicateHandle(GetCurrentProcess(), hChildStdoutRd, ! GetCurrentProcess(), (HANDLE*)fdOut, 0, ! FALSE, DUPLICATE_SAME_ACCESS); ! } ! CloseHandle(hChildStdoutRd); ! } ! ! if (!ret) goto out; } --- 201,206 ---- if (mode == kWriteMode || mode == kReadWriteMode) { ! err = RedirectStandardIO(STANDARD_OUT, &hSaveStdout, &hChildStdout, fdOut); ! if (err) goto out; } *************** *** 230,262 **** if (fdErr && *fdErr) { ! /* Save the handle to the current STDERR. */ ! hSaveStderr = GetStdHandle(STD_ERROR_HANDLE); ! ! /* Create a pipe for the child process's STDERR. */ ! ret = CreatePipe(&hChildStderrRd, &hChildStderrWr, &saAttr, 0); ! if (ret) ! { ! /* Set the write handle to the pipe to be STDERR. */ ! ret = SetStdHandle(STD_ERROR_HANDLE, hChildStderrWr); ! if (ret) ! { ! /* Duplicate the read handle to the pipe so it is not inherited. */ ! ret = DuplicateHandle(GetCurrentProcess(), hChildStderrRd, ! GetCurrentProcess(), (HANDLE*)fdErr, 0, ! FALSE, DUPLICATE_SAME_ACCESS); ! } ! CloseHandle(hChildStderrRd); ! } ! ! if (!ret) goto out; } else { ! hChildStderrWr = GetStdHandle(STD_ERROR_HANDLE); } ! /* Now create the child process. */ ! err = CreateChildProcess(cmd, hChildStdinRd, hChildStdoutWr, hChildStderrWr, processID); out: --- 208,222 ---- if (fdErr && *fdErr) { ! err = RedirectStandardIO(STANDARD_ERR, &hSaveStderr, &hChildStderr, fdErr); ! if (err) goto out; } else { ! hChildStderr = GetStdHandle(STD_ERROR_HANDLE); } ! /* Now create the child process. */ ! err = CreateChildProcess(cmd, hChildStdin, hChildStdout, hChildStderr, processID); out: *************** *** 265,327 **** if (mode == kReadMode || mode == kReadWriteMode) { ! if (hChildStdinRd) ! CloseHandle(hChildStdinRd); ! SetStdHandle(STD_INPUT_HANDLE, hSaveStdin); ! } if (mode == kWriteMode || mode == kReadWriteMode) { ! if (hChildStdoutWr) ! CloseHandle(hChildStdoutWr); ! SetStdHandle(STD_OUTPUT_HANDLE, hSaveStdout); } if (fdErr && *fdErr) { ! if (hChildStderrWr) ! CloseHandle(hChildStderrWr); ! SetStdHandle(STD_ERROR_HANDLE, hSaveStderr); ! } ! ! if (err) ! { ! if (fdIn && *fdIn) ! CloseHandle(*(HANDLE*)fdIn); ! if (fdOut && *fdOut) ! CloseHandle(*(HANDLE*)fdOut); ! if (fdErr && *fdErr) ! CloseHandle(*(HANDLE*)fdErr); ! } ! #elif defined(Unix) ! char *pmode; ! pipe_t handle; ! ! if (mode > kWriteMode) ! return mgArgErr; ! ! switch (mode) ! { ! case kReadMode: ! pMode = "r"; ! break; ! case kWriteMode: ! pMode = "w"; ! break; ! } ! ! /* Attempt to create the named pipe */ ! handle = popen(name, pMode); ! if (handle <= 0) ! { ! err = UnixToLVErr(errno); ! *fd = 0; ! } ! else ! { ! *fd = handle; } - #else - err = mgNotImplementd: - #endif return err; } --- 225,240 ---- if (mode == kReadMode || mode == kReadWriteMode) { ! RestoreStandardIO(STANDARD_IN, &hSaveStdin, hChildStdin, fdIn, err); ! } if (mode == kWriteMode || mode == kReadWriteMode) { ! RestoreStandardIO(STANDARD_OUT, &hSaveStdout, hChildStdout, fdOut, err); } if (fdErr && *fdErr) { ! RestoreStandardIO(STANDARD_ERR, &hSaveStderr, hChildStderr, fdErr, err); } return err; } *************** *** 339,343 **** #elif defined(Unix) ! if (close((pipe_t)fd) < 0) err = UnixToLVErr(errno); #else --- 252,256 ---- #elif defined(Unix) ! if (close(fd) < 0) err = UnixToLVErr(errno); #else *************** *** 375,384 **** #if defined(MSWin) /* ReadFile blocks on any pipe not opened in overlapped mode and the anonymous ! pipes used for standard handle redirection are always non-overlapping. We don't ! want to block here, as for LabVIEW configurations with only one thread per ! execution system we would block the ReadPipe function and can't read another ! pipe. So we peek first at the pipe to see if there is anything available and if so ! we invoke ReadFile to read the entire data instead of maybe only part of a byte- ! stream sent from the other side.*/ if (!PeekNamedPipe((HANDLE)fd, NULL, 0, NULL, bytesRead, NULL)) { --- 288,297 ---- #if defined(MSWin) /* ReadFile blocks on any pipe not opened in overlapped mode and the anonymous ! pipes used for standard handle redirection are always non-overlapping. We don't ! want to block here, as for LabVIEW configurations with only one thread per ! execution system we would block the ReadPipe function and can't read another ! pipe. So we peek first at the pipe to see if there is anything available and if so ! we invoke ReadFile to read the entire data instead of maybe only part of a byte- ! stream sent from the other side.*/ if (!PeekNamedPipe((HANDLE)fd, NULL, 0, NULL, bytesRead, NULL)) { *************** *** 445,459 **** } #else ! err = mgNotImplementd: #endif return err; } ! /* size of the table */ ! #define ERRTABLESIZE (sizeof(errtable)/sizeof(errtable[0])) #if defined(MSWin) ! static MgErr CreateChildProcess(LPSTR cmdline, HANDLE stdIn, HANDLE stdOut, HANDLE stdErr, DWORD *pid) { PROCESS_INFORMATION piProcInfo; STARTUPINFOA siStartInfo; --- 358,474 ---- } #else ! err = mgNotImplementd; #endif return err; } ! static MgErr RedirectStandardIO(int32 type, std_handle *stdIO, pipe_handle *rmpipe, uInt32 *lvpipe) ! { ! MgErr err = noErr; ! #if defined(MSWin) ! SECURITY_ATTRIBUTES saAttr = { 0 }; ! HANDLE temp; ! BOOL ret; ! ! saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); ! saAttr.lpSecurityDescriptor = NULL; ! saAttr.bInheritHandle = TRUE; ! ! /* Save the handle to the current STDIN. */ ! *stdIO = GetStdHandle(type); ! ! /* Create a pipe for the child process's standard IO. */ ! if (type == STANDARD_IN) ! ret = CreatePipe(rmpipe, &temp, &saAttr, 0); ! else ! ret = CreatePipe(&temp, rmpipe, &saAttr, 0); ! ! if (ret) ! { ! /* Set the handle to the pipe to be STD IO. */ ! ret = SetStdHandle(type, *rmpipe); ! if (ret) ! { ! /* Duplicate the write handle to the pipe so it is not inherited. */ ! ret = DuplicateHandle(GetCurrentProcess(), temp, ! GetCurrentProcess(), (HANDLE*)lvpipe, 0, ! FALSE, DUPLICATE_SAME_ACCESS); ! ! } ! CloseHandle(temp); ! } ! if (!ret) ! err = Win32ToLVErr(GetLastError()); ! ! #elif defined(Unix) ! struct pipe_ref p_fd; ! pipe_handle temp; ! int i; ! ! /* save current std input fd + flags, and set not inheritable */ ! if (stdio->handle = dup(type) < 0) ! return UnixToLVErr(errno); ! ! stdio->flags = fcntl(type, F_GETFD, 0); ! fcntl(stdio->handle, F_SETFD, stdio->flags | FD_CLOEXEC); ! ! if (pipe((int *)&p_fd)) ! { ! err = UnixToLVErr(errno); ! close(stdio->handle); ! return err; ! } ! if (type == STANDARD_IN) ! { ! temp = p_fd.wr; ! *rmpipe = p_fd.rd; ! } ! else ! { ! temp = p_fd.rd; ! *rmpipe = p_fd.wr; ! } + if (dup2(*rmpipe, type) == type) + { + close(*rmpipe); + i = fcntl(temp, F_GETFD, 0); + fcntl(temp, F_SETFD, i | FD_CLOEXEC); + + if ((*lvpipe = (uInt32)fdopen(temp, type == STANDARD_IN ? "wb" : "rb")) == NULL) + { + err = UnixToLVErr(errno); + close(stdio->handle); + close(temp); + } + } + #else + err = mgNotImplementd + #endif + return err; + } + + static MgErr RestoreStandardIO(int32 type, std_handle *stdIO, pipe_handle rmpipe, uInt32 *lvpipe, MgErr err) + { #if defined(MSWin) ! if (rmpipe) ! CloseHandle(rmpipe); ! SetStdHandle(type, *stdIO); ! if (err) ! { ! CloseHandle(*(HANDLE*)lvpipe); ! *lvpipe = 0; ! } ! #elif defined(Unix) ! #else ! return mgNotImplementd ! #endif ! return err; ! } ! ! static MgErr CreateChildProcess(LPSTR cmdline, pipe_handle stdIn, pipe_handle stdOut, pipe_handle stdErr, uInt32 *pid) { + MgErr err = noErr; + #if defined(MSWin) PROCESS_INFORMATION piProcInfo; STARTUPINFOA siStartInfo; *************** *** 493,499 **** CloseHandle(piProcInfo.hProcess); CloseHandle(piProcInfo.hThread); ! return noErr; } struct errentry { DWORD oscode; /* OS return value */ --- 508,546 ---- CloseHandle(piProcInfo.hProcess); CloseHandle(piProcInfo.hThread); ! #elif defined(Unix) ! int pi; ! ! /* parse command line into arguments */ ! ! ! ! /* spawn the child process */ ! pi = fork(); ! ! if (pi == 0 ) ! { ! /* This is the child process. Execute the command */ ! execvp(cvs_process->args[0], cvs_process->args); ! _exit(1); ! } ! else if (pi == -1 ) ! { ! /* fork failed */ ! *pid = 0L; ! return dvOpenErr; ! } ! else ! *pid = pi; ! ! #else ! return mgNotImplementd ! #endif ! return err; } + /* size of the table */ + #define ERRTABLESIZE (sizeof(errtable)/sizeof(errtable[0])) + + #if defined(MSWin) struct errentry { DWORD oscode; /* OS return value */ |
From: Jim K. <jk...@us...> - 2005-06-25 17:44:14
|
Update of /cvsroot/opengtoolkit/deab In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14728 Modified Files: build_ogb_revisions.txt Log Message: rebuild Index: build_ogb_revisions.txt =================================================================== RCS file: /cvsroot/opengtoolkit/deab/build_ogb_revisions.txt,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** build_ogb_revisions.txt 22 Jun 2005 10:46:20 -0000 1.57 --- build_ogb_revisions.txt 25 Jun 2005 17:44:06 -0000 1.58 *************** *** 1,33 **** [build_ogb.deab] Version=1.0.0-alpha9 ! Build_Number=202 ! Build_Date="22.06.2005 18:40:21" Status=OK Warnings=0 ! Log_File="/C/Shared Projects/OpenG/deab/built/build_ogb.log" [build_ogb_api.deab] Version=1.0.0-alpha9 ! Build_Number=122 ! Build_Date="22.06.2005 18:42:32" Status=OK Warnings=0 ! Log_File="/C/Shared Projects/OpenG/deab/built/build_ogb_api.log" [build_ogb_deab.deab] Version=1.0.0-alpha9 ! Build_Number=32 ! Build_Date="22.06.2005 18:42:45" Status=OK Warnings=0 ! Log_File="/C/Shared Projects/OpenG/deab/built/build_ogb_deab.log" [build_ogb_help.deab] Version=1.0.0-alpha9 ! Build_Number=79 ! Build_Date="22.06.2005 18:42:50" Status=OK Warnings=0 ! Log_File="/C/Shared Projects/OpenG/deab/built/build_ogb_help.log" [build_ogmsiib.deab] --- 1,33 ---- [build_ogb.deab] Version=1.0.0-alpha9 ! Build_Number=204 ! Build_Date="6/25/2005 10:01:33 AM" Status=OK Warnings=0 ! Log_File=/D/Projects/OpenG/opengtoolkit/CVS_Folders/deab/built/build_ogb.log [build_ogb_api.deab] Version=1.0.0-alpha9 ! Build_Number=124 ! Build_Date="6/25/2005 10:03:32 AM" Status=OK Warnings=0 ! Log_File=/D/Projects/OpenG/opengtoolkit/CVS_Folders/deab/built/build_ogb_api.log [build_ogb_deab.deab] Version=1.0.0-alpha9 ! Build_Number=34 ! Build_Date="6/25/2005 10:03:42 AM" Status=OK Warnings=0 ! Log_File=/D/Projects/OpenG/opengtoolkit/CVS_Folders/deab/built/build_ogb_deab.log [build_ogb_help.deab] Version=1.0.0-alpha9 ! Build_Number=81 ! Build_Date="6/25/2005 10:03:48 AM" Status=OK Warnings=0 ! Log_File=/D/Projects/OpenG/opengtoolkit/CVS_Folders/deab/built/build_ogb_help.log [build_ogmsiib.deab] |
From: Jim K. <jk...@us...> - 2005-06-25 16:45:29
|
Update of /cvsroot/opengtoolkit/deab/source/Support In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16772/source/Support Modified Files: Verify if NIAB is present.vi Log Message: fixed check for NIAB test in LabVIEW 8.0 Index: Verify if NIAB is present.vi =================================================================== RCS file: /cvsroot/opengtoolkit/deab/source/Support/Verify if NIAB is present.vi,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsl2CjOG and /tmp/cvsvTfCls differ |
From: Konstantin S. <ks...@us...> - 2005-06-25 08:36:54
|
Update of /cvsroot/opengtoolkit/deab/source/GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8693/source/GUI Modified Files: OpenG_Builder.vi Log Message: Index: OpenG_Builder.vi =================================================================== RCS file: /cvsroot/opengtoolkit/deab/source/GUI/OpenG_Builder.vi,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 Binary files /tmp/cvsAzvjtc and /tmp/cvsH3ahgU differ |
From: Konstantin S. <ks...@us...> - 2005-06-22 10:47:37
|
Update of /cvsroot/opengtoolkit/deab/source/GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22047/source/GUI Modified Files: OpenG_Builder.vi Log Message: Index: OpenG_Builder.vi =================================================================== RCS file: /cvsroot/opengtoolkit/deab/source/GUI/OpenG_Builder.vi,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 Binary files /tmp/cvsYFjTw7 and /tmp/cvshKyfRJ differ |