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
07ee1168
Commit
07ee1168
authored
Aug 22, 2006
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dcli_search_file used when displaying packages for a node
parent
ab20303e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
28 deletions
+16
-28
wb/lib/wb/src/wb_wpkgnav.cpp
wb/lib/wb/src/wb_wpkgnav.cpp
+16
-28
No files found.
wb/lib/wb/src/wb_wpkgnav.cpp
View file @
07ee1168
/*
/*
* Proview $Id: wb_wpkgnav.cpp,v 1.
5 2005-09-06 10:43:32
claes Exp $
* Proview $Id: wb_wpkgnav.cpp,v 1.
6 2006-08-22 07:49:13
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -546,50 +546,37 @@ WItemPkgNode::WItemPkgNode( WNavBrow *brow, char *item_name,
...
@@ -546,50 +546,37 @@ WItemPkgNode::WItemPkgNode( WNavBrow *brow, char *item_name,
int
WItemPkgNode
::
open_children
(
WNavBrow
*
brow
,
double
x
,
double
y
,
int
display_mode
)
int
WItemPkgNode
::
open_children
(
WNavBrow
*
brow
,
double
x
,
double
y
,
int
display_mode
)
{
{
char
cmd
[
200
];
char
tmpfile
[
200
]
=
"$pwrp_tmp/wpkg.tmp"
;
char
line
[
200
];
char
line_item
[
6
][
80
];
int
num
;
char
timestr
[
32
];
pwr_tTime
time
;
pwr_tTime
time
;
int
pkg_cnt
=
0
;
int
pkg_cnt
=
0
;
WItemPkgPackage
*
item
;
WItemPkgPackage
*
item
;
int
inserted
=
0
;
int
inserted
=
0
;
brow_tObject
child
;
brow_tObject
child
;
int
sts
;
int
sts
;
pwr_tFileName
file_spec
,
found_file
;
char
dev
[
80
],
dir
[
80
],
file
[
80
],
type
[
80
];
int
version
;
if
(
brow_IsOpen
(
node
))
{
if
(
brow_IsOpen
(
node
))
{
close
(
brow
,
0
,
0
);
close
(
brow
,
0
,
0
);
return
1
;
return
1
;
}
}
sprintf
(
cmd
,
"pwr_pkg.sh -lp $pwrp_load/pwrp_pkg_%s_*.tgz > %s"
,
nodename
,
tmpfile
);
system
(
cmd
);
dcli_translate_filename
(
tmpfile
,
tmpfile
);
ifstream
is
(
tmpfile
);
sprintf
(
file_spec
,
"$pwrp_load/pwrp_pkg_%s_*.tgz"
,
nodename
);
sts
=
dcli_search_file
(
file_spec
,
found_file
,
DCLI_DIR_SEARCH_INIT
);
brow_SetNodraw
(
brow
->
ctx
);
brow_SetNodraw
(
brow
->
ctx
);
while
(
is
.
getline
(
line
,
sizeof
(
line
)))
{
while
(
ODD
(
sts
))
{
dcli_trim
(
line
,
line
);
if
(
line
[
0
]
==
'#'
||
line
[
0
]
==
'!'
)
continue
;
num
=
dcli_parse
(
line
,
" "
,
""
,
(
char
*
)
line_item
,
sizeof
(
line_item
)
/
sizeof
(
line_item
[
0
]),
sizeof
(
line_item
[
0
]),
0
);
if
(
num
!=
6
)
continue
;
sprintf
(
timestr
,
"%s %s"
,
line_item
[
4
],
line_item
[
5
]);
dcli_file_time
(
found_file
,
&
time
);
time_AsciiToA
(
timestr
,
&
time
);
dcli_parse_filename
(
found_file
,
dev
,
dir
,
file
,
type
,
&
version
);
strcat
(
file
,
type
);
sts
=
brow_GetChild
(
brow
->
ctx
,
node
,
&
child
);
sts
=
brow_GetChild
(
brow
->
ctx
,
node
,
&
child
);
while
(
ODD
(
sts
))
{
while
(
ODD
(
sts
))
{
brow_GetUserData
(
child
,
(
void
**
)
&
item
);
brow_GetUserData
(
child
,
(
void
**
)
&
item
);
if
(
item
->
time
.
tv_sec
<
time
.
tv_sec
)
{
if
(
item
->
time
.
tv_sec
<
time
.
tv_sec
)
{
new
WItemPkgPackage
(
brow
,
line_item
[
0
],
line_item
[
0
]
,
time
,
child
,
new
WItemPkgPackage
(
brow
,
file
,
file
,
time
,
child
,
flow_eDest_Before
);
flow_eDest_Before
);
inserted
=
1
;
inserted
=
1
;
break
;
break
;
...
@@ -597,13 +584,14 @@ int WItemPkgNode::open_children( WNavBrow *brow, double x, double y, int display
...
@@ -597,13 +584,14 @@ int WItemPkgNode::open_children( WNavBrow *brow, double x, double y, int display
sts
=
brow_GetNextSibling
(
brow
->
ctx
,
child
,
&
child
);
sts
=
brow_GetNextSibling
(
brow
->
ctx
,
child
,
&
child
);
}
}
if
(
!
inserted
)
if
(
!
inserted
)
new
WItemPkgPackage
(
brow
,
line_item
[
0
],
line_item
[
0
]
,
time
,
node
,
new
WItemPkgPackage
(
brow
,
file
,
file
,
time
,
node
,
flow_eDest_IntoLast
);
flow_eDest_IntoLast
);
pkg_cnt
++
;
pkg_cnt
++
;
}
is
.
close
();
sts
=
dcli_search_file
(
file_spec
,
found_file
,
DCLI_DIR_SEARCH_NEXT
);
}
dcli_search_file
(
file_spec
,
found_file
,
DCLI_DIR_SEARCH_END
);
if
(
pkg_cnt
)
{
if
(
pkg_cnt
)
{
brow_SetOpen
(
node
,
wnav_mOpen_Children
);
brow_SetOpen
(
node
,
wnav_mOpen_Children
);
...
...
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