Skip to content

Commit

Permalink
fastest version
Browse files Browse the repository at this point in the history
  • Loading branch information
FiveTechSoft committed Jun 21, 2024
1 parent 42afd05 commit 0df3bbb
Show file tree
Hide file tree
Showing 108 changed files with 5,100 additions and 0 deletions.
23 changes: 23 additions & 0 deletions version 3.0 Manu Exposito/.vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"configurations": [
{
"name": "Win32",
"intelliSenseMode": "msvc-x64",
"includePath": [
"${workspaceFolder}/include",
"u:/desarrollo/comp/xc/hb/include",
"c:/xampp/apache/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.19041.0",
"compilerPath": "c:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++20"
}
],
"version": 4
}
16 changes: 16 additions & 0 deletions version 3.0 Manu Exposito/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//-----------------------------------------------------------------------------
// Setting de Area de Trabajo (WA)
//-----------------------------------------------------------------------------
{
//-------------------------------------------------------------------------
// De Harbour:
"harbour.extraIncludePaths": [
"u:/desarrollo/vscode/proyectos/mod_harbour/include",
"u:/desarrollo/comp/xc/hb/include"
],
"files.associations": {
"*.ch": "harbour",
"*.prg": "harbour"
},
//-------------------------------------------------------------------------
}
125 changes: 125 additions & 0 deletions version 3.0 Manu Exposito/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Crea",
"type": "shell",
"windows": {
"command": "${workspaceFolder}/cmd/win/crea",
},
"linux": {
"command": "${workspaceFolder}/cmd/linux/crea.sh",
},
"presentation": {
"focus": true,
"panel": "new",
"showReuseMessage": false,
"clear": false
},
"options": {
"statusbar": {
"tooltip": "Construye las libreria harbour_mod.so",
"color": "#7bff00",
"label": "$(settings-gear) Crea"
}
}
},
{
"label": "Copia",
"type": "shell",
"windows": {
"command": "${workspaceFolder}/cmd/win/copia",
},
"linux": {
"command": "${workspaceFolder}/cmd/linux/copia.sh",
},
"presentation": {
"focus": true,
"panel": "new",
"showReuseMessage": false,
"clear": false
},
"options": {
"statusbar": {
"tooltip": "Copia harbour_mod.so en Apache",
"color": "#ffee00",
"label": "$(settings-gear) Copia"
}
}
},
{
"label": "Limpia",
"type": "shell",
"windows": {
"command": "${workspaceFolder}/cmd/win/limpia",
},
"linux": {
"command": "${workspaceFolder}/cmd/linux/limpia.sh",
},
"presentation": {
"focus": true,
"panel": "new",
"showReuseMessage": false,
"clear": false
},
"options": {
"statusbar": {
"tooltip": "Limpia entorno y borra mod_harbour.so si existe",
"color": "#ffffff",
"label": "$(trash) Limpia"
}
}
},
{
"label": "Copia tests",
"type": "shell",
"windows": {
"command": "${workspaceFolder}/cmd/win/copiatests",
},
"linux": {
"command": "${workspaceFolder}/cmd/linux/copiatests.sh",
},
"presentation": {
"focus": true,
"panel": "new",
"showReuseMessage": false,
"clear": false
},
"options": {
"statusbar": {
"tooltip": "Copia los PRG en Apache",
"color": "#0400ff",
"label": "$(settings-gear) Copia tests"
}
}
},
{
"label": "Empaqueta",
"type": "shell",
"windows": {
"command": "${workspaceFolder}/cmd/win/packer",
},
"linux": {
"command": "${workspaceFolder}/cmd/linux/packer.sh",
},
"args": [
"mod_harbour"
],
"presentation": {
"focus": true,
"panel": "new",
"showReuseMessage": false,
"clear": false
},
"options": {
"statusbar": {
"tooltip": "Empaqueta fuentes de MOS_HARBOURPLUS y entorno",
"color": "#ffee00",
"label": "$(package) Empaqueta"
}
}
},
]
}
4 changes: 4 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/copia.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo Moviendo Libreria SO...
@move .\lib\mod_harbour.so c:\xampp\apache\modules
@del .\lib\mod_harbour.lib
@del .\lib\mod_harbour.exp
2 changes: 2 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/copiaTests.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo Copiando tests...
@xcopy .\tests\*.* c:\xampp\htdocs\hb /S /Y
10 changes: 10 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/crea.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@cls
@call "c:/program files/microsoft visual studio/2022/community/vc/auxiliary/build/vcvars64.bat"
@u:\desarrollo\comp\xc\hb\bin\hbmk2 -comp=msvc64 .\hbp\mod_harbour.hbp
@if errorlevel 1 goto error
@goto exit

:error
@echo *** Error compile ***

:exit
3 changes: 3 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/limpia.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo Borrando Libreria SO...
@del c:\xampp\apache\modules\mod_harbour.so
@if exist .\lib ( @rmdir .\lib /S/Q )
8 changes: 8 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/packer.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@rem --------------------------------------------------------------------------
@rem Empaqueta fuentes
@rem --------------------------------------------------------------------------

@cd u:/desarrollo/vscode/proyectos
@set cpfic=e:/vscode.copias/mod_harbour/mod_harbour-%date:~-4%-%date:~3,2%-%date:~0,2%-0
@"%programfiles%"\7-zip\7z a -r %cpfic% mod_harbour/* -mx
@"%programfiles%"\7-zip\7z l %cpfic%.7z
3 changes: 3 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@REM C:\xampp\apache\bin\ab -n 1000 -c 100 "http://127.0.0.1/hb/__hello.prg"
@C:\xampp\apache\bin\ab -n 1000 -c 100 "http://127.0.0.1/hb/testhrb.hrb"
@pause
2 changes: 2 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/testdbf.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@C:\xampp\apache\bin\ab -n 1000 -c 100 "http://127.0.0.1/hb/dbedit.prg"
@rem pause
2 changes: 2 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/testf.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@C:\xampp\apache\bin\ab -n 1000 -c 100 "http://127.0.0.1/hb/estres/test001.prg"
@pause
2 changes: 2 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/testl.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@C:\xampp\apache\bin\ab -n 1000 -c 100 "http://127.0.0.1/hb/modules/modules.prg"
@rem pause
3 changes: 3 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/testlf.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@rem C:\xampp\apache\bin\ab -n 1000 -c 100 "http://127.0.0.1/hb/loadfile.prg"
@C:\xampp\apache\bin\ab -n 1000 -c 100 "http://127.0.0.1/hb/mi_pluggin/pluggin.prg"
@rem pause
2 changes: 2 additions & 0 deletions version 3.0 Manu Exposito/cmd/win/testphp.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@C:\xampp\apache\bin\ab -n 1000 -c 100 "http://127.0.0.1/hb/__hello.php"
@pause
55 changes: 55 additions & 0 deletions version 3.0 Manu Exposito/hbp/mod_harbour.hbp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
###############################################################################
# Crea la dll, so y las libs
###############################################################################

-hbdynvm
-o..\lib\mod_harbour.so
-mt
-trace
-info
-n -es2 -w3 -kmo -i-
#-cflag=-Wall

# Ficheros de cabecera
-i..\include

# Librerias excluidas forzosamente
-l-hbfship
-l-hbxpp

# Librerias necesarias
-llibcrypto-1_1-x64
-llibssl-1_1-x64
-llibcurl-x64

# Fichero de cabecera y librerias de Apache
-ic:\xampp\apache\include
-Lc:\xampp\apache\lib
-lapr-1
-laprutil-1
-llibapr-1
-llibaprutil-1
-llibhttpd

# Fuentes de funciones en C
../src/c/mod_harbour.c
../src/c/ap_functions.c
../src/c/apr_functions.c
../src/c/debug.c

# Fuentes en PRG
../src/prg/mh_apache.prg
../src/prg/mh_classes.prg
../src/prg/errorsys.prg

# Contribuciones
hbcurl.hbc
hbssl.hbc
hbhpdf.hbc
xhb.hbc
hbct.hbc
hbmzip.hbc
hbziparc.hbc
hbmemio.hbc
hbnetio.hbc
hbmisc.hbc
67 changes: 67 additions & 0 deletions version 3.0 Manu Exposito/include/mh_externs.ch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//------------------------------------------------------------------------------
#ifndef MH_EXTERNS_CH_
#define MH_EXTERNS_CH_
//------------------------------------------------------------------------------
// Incluye los simbolos de Harbour

#define __HBEXTERN__HARBOUR__REQUEST
#include "harbour.hbx"

//------------------------------------------------------------------------------
// Incluye simbolos de algunas contrib
//------------------------------------------------------------------------------

#define __HBEXTERN__HBHPDF__REQUEST
#include "u:/desarrollo/comp/xc/hb/contrib/hbhpdf/hbhpdf.hbx"
#define __HBEXTERN__XHB__REQUEST
#include "u:/desarrollo/comp/xc/hb/contrib/xhb/xhb.hbx"
#define __HBEXTERN__HBCT__REQUEST
#include "u:/desarrollo/comp/xc/hb/contrib/hbct/hbct.hbx"
#define __HBEXTERN__HBCURL__REQUEST
#include "u:/desarrollo/comp/xc/hb/contrib/hbcurl/hbcurl.hbx"
#define __HBEXTERN__HBNETIO__REQUEST
#include "u:/desarrollo/comp/xc/hb/contrib/hbnetio/hbnetio.hbx"
#define __HBEXTERN__HBMZIP__REQUEST
#include "u:/desarrollo/comp/xc/hb/contrib/hbmzip/hbmzip.hbx"
#define __HBEXTERN__HBZIPARC__REQUEST
#include "u:/desarrollo/comp/xc/hb/contrib/hbziparc/hbziparc.hbx"
#define __HBEXTERN__HBSSL__REQUEST
#include "u:/desarrollo/comp/xc/hb/contrib/hbssl/hbssl.hbx"
#define __HBEXTERN__HBTIP__REQUEST
#include "u:/desarrollo/comp/xc/hb/contrib/hbtip/hbtip.hbx"

//------------------------------------------------------------------------------
// Incluye simbolos de mod_harbour
//------------------------------------------------------------------------------

// Funciones de iterfaz con Apache
extern AP_RPUTS, AP_RWRITE, AP_ECHO
extern AP_SETSYSENV, AP_DELETESYSENV, AP_GETENV, AP_GETSYSENV, AP_GETFILENAME
extern AP_GETMETHOD, AP_GETBODY, AP_GETHEADERSIN, AP_GETHEADERSOUT
extern AP_GETURI, AP_GETUSERIP, AP_GETHOSTNAME, AP_GETARGS, AP_GETSTATUS
extern AP_SETHEADEROUT, AP_SETPERSISTENT, AP_GETPERSISTENT, AP_GETSCRIPTPATH
extern AP_COOKIEREADALL, AP_COOKIEWRITE, AP_COOKIEREAD
extern AP_COOKIECHECK, AP_COOKIEREMOVE
extern AP_SETCGIVAR, AP_READPOST, AP_READGET, AP_SETCONTENTTYPE
extern AP_GETCONTENTTYPE, AP_URLDECODE, AP_URLENCODE, AP_HTMLENCODE, AP_ESCAPEHTML

// Funciones interface de APR LIB
extern APR_LOCK, APR_TRYLOCK, APR_UNLOCK, APR_MUTEXCREATE, APR_MUTEXLOCK
extern APR_MUTEXTRYLOCK, APR_MUTEXUNLOCK, APR_MUTEXDESTROY, APR_FILELOAD
extern APR_READCODE, APR_TIMENOW, APR_HTTIME
extern APR_MSECONEDAY, APR_MSECONEHR, APR_MSECONEMIN, APR_MSECONESEC

// Otras funciones
extern AP_STRFROMPTR, AP_INTFROMPTR

// Funciones de depuracion solo en windows (quitar cuando no sean necesarias)
#ifdef __PLATFORM__WINDOWS
extern OUTSTR, OUTNUM
#endif

//------------------------------------------------------------------------------
// Incluir aqui los *.hbx que se quieran agregar para usar

//------------------------------------------------------------------------------
#endif // Fin de MH_EXTERNS_CH_
//------------------------------------------------------------------------------
43 changes: 43 additions & 0 deletions version 3.0 Manu Exposito/include/mod_harbour.ch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//------------------------------------------------------------------------------
// Mod_harbour
//------------------------------------------------------------------------------

#ifndef MOD_APACHE_CH_
#define MOD_APACHE_CH_

//------------------------------------------------------------------------------

#include "hbhrb.ch"
#include 'hbclass.ch'
#include "hbthread.ch"
#include "fileio.ch"
#include "error.ch"

#define _MODNAME 'Mod_HarbourPlus'
#define _MODVERSION '1.00'
#define _MODVERDATE _MODNAME + " v." + _MODVERSION + "." + __DATE__

#define CRLF '<br>'
#define REQUESTVAR THREAD STATIC

#xcommand ? [<explist,...>] => ap_echo( [<explist>,] '<br>' )
#xcommand ?? [<explist,...>] => ap_echo( [<explist>,] "" )

#xcommand BLOCKS TO <b> [ PARAMS [<v1>] [,<vn>] ] [ TAGS <t1>,<t2> ];
=> #pragma __cstream | <b>+=mh_replaceBlocks( %s, "{{", "}}" [,<(v1)>][+","+<(vn)>] [, @<v1>][, @<vn>] )

#xcommand DEFAULT <v1> TO <x1> [, <vn> TO <xn> ] ;
=> IF <v1> == NIL ; <v1> := <x1> ; END [; IF <vn> == NIL ; <vn> := <xn> ; END ]

#xcommand DEFAULT <v1> := <x1> [, <vn> TO <xn> ] ;
=> IF <v1> == NIL ; <v1> := <x1> ; END [; IF <vn> == NIL ; <vn> := <xn> ; END ]

#xcommand TRY => BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
#xcommand CATCH [<!oErr!>] => RECOVER [USING <oErr>] <-oErr->
#xcommand FINALLY => ALWAYS

//------------------------------------------------------------------------------

#endif // MOD_APACHE_CH_

//------------------------------------------------------------------------------
Loading

0 comments on commit 0df3bbb

Please sign in to comment.