Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
d79feb72
Commit
d79feb72
authored
Aug 24, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Template for includes inserted at structfile generation
parent
2d012953
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
src/exe/co_convert/src/cnv_wbltoh.cpp
src/exe/co_convert/src/cnv_wbltoh.cpp
+26
-2
No files found.
src/exe/co_convert/src/cnv_wbltoh.cpp
View file @
d79feb72
/*
* Proview $Id: cnv_wbltoh.cpp,v 1.
9 2006-01-16 14:59:23
claes Exp $
* Proview $Id: cnv_wbltoh.cpp,v 1.
10 2007-08-24 13:59:54
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -28,6 +28,7 @@
extern
"C"
{
#include "pwr.h"
#include "pwr_version.h"
#include "co_dcli.h"
#include "co_cdh.h"
}
...
...
@@ -43,6 +44,7 @@ int CnvWblToH::init( char *first)
{
pwr_tFileName
struct_filename
;
pwr_tFileName
fname
;
pwr_tFileName
found_file
;
int
sts
;
get_filename
(
ctx
->
rw
,
struct_filename
,
ctx
->
hpp
);
...
...
@@ -75,7 +77,9 @@ int CnvWblToH::init( char *first)
}
fp_struct
<<
"/* Generated by co_convert */"
<<
endl
<<
"/* Proview "
<<
pwrv_cPwrVersionStr
<<
" "
<<
struct_filename
<<
" */"
<<
endl
<<
endl
<<
"/* Generated by co_convert. */"
<<
endl
<<
"/* Do not edit this file. */"
<<
endl
<<
endl
<<
"#ifndef "
<<
fname
<<
endl
<<
"#define "
<<
fname
<<
endl
<<
endl
<<
...
...
@@ -85,6 +89,26 @@ endl <<
endl
<<
endl
;
// If there is a template file on the source dir, insert this file here
strcpy
(
fname
,
ctx
->
rw
->
source_dir
);
strcat
(
fname
,
"/"
);
strcat
(
fname
,
struct_filename
);
strcat
(
fname
,
"_template"
);
sts
=
dcli_search_file
(
fname
,
found_file
,
DCLI_DIR_SEARCH_INIT
);
if
(
EVEN
(
sts
))
return
1
;
dcli_search_file
(
fname
,
found_file
,
DCLI_DIR_SEARCH_END
);
FILE
*
fp_template
=
fopen
(
found_file
,
"r"
);
char
c
;
while
(
(
c
=
fgetc
(
fp_template
))
!=
EOF
)
fp_struct
.
put
(
c
);
fclose
(
fp_template
);
fp_struct
<<
endl
;
return
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment