$NetBSD: patch-an,v 1.4 2004/02/04 20:38:00 markd Exp $

--- klaptopdaemon/portable.cpp.orig	2003-11-30 22:50:47.000000000 +1300
+++ klaptopdaemon/portable.cpp
@@ -2414,10 +2414,14 @@ laptop_portable::software_suspend_set_ma
 #include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <machine/apmvar.h>
-#include <iostream.h>
+#include <iostream>
+#include <qpushbutton.h>
+#include <qobject.h>
+#include <kactivelabel.h>
+#include <kprocess.h>
 
 //
-// klaptopdeamon interface to NetBSD 1.5 apm.
+// Klaptopdeamon interface to NetBSD 1.5 apm.
 // Scott Presnell, srp@zgi.com, srp@tworoads.net
 // Fri Jun 29 17:21:25 PDT 2001
 // Tested on Dell I4K running NetBSD 1.5R
@@ -2439,6 +2443,7 @@ laptop_portable::has_power_management()
        }
 
        struct apm_power_info info;
+       memset(&info, 0, sizeof(info));
        ret=ioctl(fd, APM_IOC_GETPOWER, &info);
        ::close(fd);
 
@@ -2466,6 +2471,7 @@ int laptop_portable::has_battery_time()
          return 0;
 
        struct apm_power_info info;
+       memset(&info, 0, sizeof(info));
        ret=ioctl(fd, APM_IOC_GETPOWER, &info);
        ::close(fd);
 
@@ -2639,6 +2645,15 @@ laptop_portable::apm_set_mask(bool , boo
 
 
 //
+//      adds extra widgets to the battery panel
+//
+void
+laptop_portable::extra_config(QWidget *parent, KConfig *config, QVBoxLayout *layout)
+{
+}
+
+
+//
 //     return current battery state
 //
 struct power_result laptop_portable::poll_battery_state()
@@ -2652,6 +2667,7 @@ struct power_result laptop_portable::pol
                goto bad;
 
                struct apm_power_info info;
+               memset(&info, 0, sizeof(info));
                ret=ioctl(fd, APM_IOC_GETPOWER, &info);
                ::close(fd);
        
@@ -2714,7 +2730,16 @@ laptop_portable::get_brightness()
 }
 
 bool
-laptop_portable::get_system_throttling(bool, int &current, QStringList &s)   // do something to help get system throttling data from places like ACPI
+laptop_portable::get_system_performance(bool, int &current, QStringList &s, bool *&)	 // do something to help get system profiles from places like ACPI
+{
+	// INSERT HERE
+	current = 0;
+	s.clear();
+	return(0);	// if no profiles are available
+}
+
+bool
+laptop_portable::get_system_throttling(bool, int &current, QStringList &s, bool *&)   // do something to help get system throttling data from places like ACPI
 {
 	// INSERT HERE
 	current = 0;
@@ -2772,6 +2797,12 @@ laptop_portable::get_battery_status(int 
 	values.append(s);
 }
 
+void
+laptop_portable::software_suspend_set_mask(bool hibernate)
+{
+	// software_suspend_is_preferred = hibernate;
+}
+
 #else
 
 /*
