Hello,
here's a patch that fixes the build of dtinfo documents on OpenBSD.
Some new warnings are also resolved.
Regards, Ulrich
--
Ulrich Wilkens
Email: m...@uwilkens.de
>From 545d63135e6c1f7da8a5127dead6c87fb14ffbe1 Mon Sep 17 00:00:00 2001
From: Ulrich Wilkens <m...@uwilkens.de>
Date: Fri, 10 Jun 2016 06:31:28 +0200
Subject: [PATCH] Fix dtinfo document build on OpenBSD
---
cde/programs/dtinfo/DtMmdb/hmphf/mphf_funcs.C | 21 +++------------------
.../dtinfo/dtinfo/src/Agents/NodePrintAgent.C | 4 +++-
.../dtinfo/dtinfo/src/Managers/GraphicsMgr.C | 4 +++-
3 files changed, 9 insertions(+), 20 deletions(-)
diff --git a/cde/programs/dtinfo/DtMmdb/hmphf/mphf_funcs.C b/cde/programs/dtinfo/DtMmdb/hmphf/mphf_funcs.C
index 745d259..207d2c3 100644
--- a/cde/programs/dtinfo/DtMmdb/hmphf/mphf_funcs.C
+++ b/cde/programs/dtinfo/DtMmdb/hmphf/mphf_funcs.C
@@ -235,16 +235,6 @@ int write_spec(buckets& bs, params& pms, buffer& mphf_buffer)
mphf_buffer.expand_chunk(spec_bytes);
-/*
- mphf_buffer.put(pms.v_n); mphf_buffer.put('\n');
- mphf_buffer.put(pms.v_b); mphf_buffer.put('\n');
- mphf_buffer.put(pms.v_p1); mphf_buffer.put('\n');
- mphf_buffer.put(pms.v_p2); mphf_buffer.put('\n');
- mphf_buffer.put(pms.v_r); mphf_buffer.put('\n');
- mphf_buffer.put(pms.v_seed); mphf_buffer.put('\n');
- mphf_buffer.put(g_array_bytes); mphf_buffer.put('\t');
- mphf_buffer.put((char*)c_array, g_array_bytes); mphf_buffer.put('\n');
-*/
ostringstream fout(mphf_buffer.get_base(), ios::out);
@@ -252,13 +242,7 @@ int write_spec(buckets& bs, params& pms, buffer& mphf_buffer)
fout << pms.v_b << "\n";
fout << pms.v_p1 << "\n";
fout << pms.v_p2 << "\n";
-
-/*
- int new_v_r = pms.v_r; SET_BIT(new_v_r, 0x80000000);
- fout << new_v_r << "\n";
-*/
fout << pms.v_r << "\n";
-
fout << pms.v_seed << "\n";
fout << g_array_bytes << '\t';
@@ -266,8 +250,9 @@ int write_spec(buckets& bs, params& pms, buffer& mphf_buffer)
fout << '\n';
- mphf_buffer.set_content_sz(spec_bytes);
- memcpy(mphf_buffer.get_base(), fout.str().c_str(), spec_bytes);
+ int fout_len = fout.str().size();
+ mphf_buffer.set_content_sz(fout_len);
+ memcpy(mphf_buffer.get_base(), fout.str().c_str(), fout_len);
delete c_array;
diff --git a/cde/programs/dtinfo/dtinfo/src/Agents/NodePrintAgent.C b/cde/programs/dtinfo/dtinfo/src/Agents/NodePrintAgent.C
index be4639b..5baff81 100644
--- a/cde/programs/dtinfo/dtinfo/src/Agents/NodePrintAgent.C
+++ b/cde/programs/dtinfo/dtinfo/src/Agents/NodePrintAgent.C
@@ -217,9 +217,11 @@ _DtHelpCreatePrintArea(Widget parent,
Dimension width,
Dimension height)
{
- extern AppPrintData * l_AppPrintData;
DtHelpDispAreaStruct * DisplayArea;
+#if 0 && defined(PRINTING_SUPPORTED)
+ extern AppPrintData * l_AppPrintData;
String string_resolution;
+#endif /* PRINTING_SUPPORTED */
int resolution = 0;
// get print resolution from default-printer-resolution
diff --git a/cde/programs/dtinfo/dtinfo/src/Managers/GraphicsMgr.C b/cde/programs/dtinfo/dtinfo/src/Managers/GraphicsMgr.C
index 0f3faa3..2661c20 100644
--- a/cde/programs/dtinfo/dtinfo/src/Managers/GraphicsMgr.C
+++ b/cde/programs/dtinfo/dtinfo/src/Managers/GraphicsMgr.C
@@ -103,9 +103,11 @@ GraphicsMgr::~GraphicsMgr ()
PixmapGraphic *
GraphicsMgr::get_graphic (UAS_Pointer<Graphic> &gr)
{
+#if 0 && defined(PRINTING_SUPPORTED)
extern AppPrintData * l_AppPrintData;
- int resolution = 0;
String string_resolution ;
+#endif /* PRINTING_SUPPORTED */
+ int resolution = 0;
// if printing, get print resolution from default-printer-resolution
--
1.7.11.5
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel