summaryrefslogtreecommitdiff
path: root/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/macros/CCodeGeneration/C_InitHeader.sci')
-rw-r--r--2.3-1/macros/CCodeGeneration/C_InitHeader.sci77
1 files changed, 77 insertions, 0 deletions
diff --git a/2.3-1/macros/CCodeGeneration/C_InitHeader.sci b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
new file mode 100644
index 00000000..97dcf0d6
--- /dev/null
+++ b/2.3-1/macros/CCodeGeneration/C_InitHeader.sci
@@ -0,0 +1,77 @@
+function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName,Target,OpenCVUsed)
+// function C_InitHeader(C_Prototype,HeaderFileName,Sci2CLibMainHeaderFName)
+// -----------------------------------------------------------------
+// //NUT: add description here
+//
+// Input data:
+// //NUT: add description here
+//
+// Output data:
+// //NUT: add description here
+//
+// Status:
+// 27-Oct-2007 -- Raffaele Nutricato: Author.
+//
+// Copyright 2007 Raffaele Nutricato.
+// Contact: raffaele.nutricato@tiscali.it
+// -----------------------------------------------------------------
+
+// ------------------------------
+// --- Check input arguments. ---
+// ------------------------------
+SCI2CNInArgCheck(argn(2),5,5);
+
+// -----------------------
+// --- Initialization. ---
+// -----------------------
+// ---------------------------
+// --- End Initialization. ---
+// ---------------------------
+
+
+C_SCI2CHeader(HeaderFileName);
+[tmppath,tmpfname,tmpextension]=fileparts(HeaderFileName);
+PrintStringInfo('#ifndef '+tmpfname+'_h',HeaderFileName,'file','y');
+PrintStringInfo('#define '+tmpfname+'_h',HeaderFileName,'file','y');
+PrintStringInfo('/*',HeaderFileName,'file','y');
+PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('** ----- Target ------ ',HeaderFileName,'file','y');
+PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('*/',HeaderFileName,'file','y');
+PrintStringInfo('#define ' + Target + '1 1' ,HeaderFileName,'file','y');
+PrintStringInfo('/*',HeaderFileName,'file','y');
+PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('** --- SCI2C Includes. --- ',HeaderFileName,'file','y');
+PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('*/',HeaderFileName,'file','y');
+PrintStringInfo('#include ""'+Sci2CLibMainHeaderFName+'""',HeaderFileName,'file','y');
+PrintStringInfo('/*',HeaderFileName,'file','y');
+PrintStringInfo('** --------------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('** --- End SCI2C Includes. --- ',HeaderFileName,'file','y');
+PrintStringInfo('** --------------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('*/',HeaderFileName,'file','y');
+PrintStringInfo(' ',HeaderFileName,'file','y');
+PrintStringInfo(' ',HeaderFileName,'file','y');
+//PrintStringInfo('#ifdef __cplusplus',HeaderFileName,'file','y');
+//PrintStringInfo('extern ""C"" {',HeaderFileName,'file','y');
+//PrintStringInfo('#endif',HeaderFileName,'file','y');
+PrintStringInfo('/*',HeaderFileName,'file','y');
+PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('** --- Prototypes. --- ',HeaderFileName,'file','y');
+PrintStringInfo('** ------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('*/',HeaderFileName,'file','y');
+PrintStringInfo(C_IndentBlanks(0)+C_Prototype,HeaderFileName,'file','y');
+PrintStringInfo('/*',HeaderFileName,'file','y');
+PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('** --- End Prototypes. --- ',HeaderFileName,'file','y');
+PrintStringInfo('** ----------------------- ',HeaderFileName,'file','y');
+PrintStringInfo('*/',HeaderFileName,'file','y');
+PrintStringInfo(' ',HeaderFileName,'file','y');
+PrintStringInfo(' ',HeaderFileName,'file','y');
+PrintStringInfo('/*',HeaderFileName,'file','y');
+PrintStringInfo('** ------------------------ ',HeaderFileName,'file','y');
+PrintStringInfo('** --- USER2C Includes. --- ',HeaderFileName,'file','y');
+PrintStringInfo('** ------------------------ ',HeaderFileName,'file','y');
+PrintStringInfo('*/',HeaderFileName,'file','y');
+
+endfunction