PktCSysLib

[ Functions ] [ Using PktCSysLib ] [ History ]

PktCSysLib is a native library for PocketC for Palm that is free to use for PocketC users. The program is not in the public domain however and is Copyright © 1998 Marvin E. Wilborne III, all rights reserved.

Download everything (including this documentation) for later.

Introduction

This module gives your PocketC program the ability to:

Functions added to PocketC by PktCSysLib

(in alphabetical order)

Several functions get added to PocketC when you use PktCSysLib. Here is a description of each function, the parameters the functions take, and values returned.

Some functions are demonstrated in the Sample Source below.

Using PktCSysLib in your programs

Download PktCSysLib.prc and install it on your Palm device using the Palm Intall tool. Then HotSync your Palm device.

To use PktCSysLib in your PocketC program, you need to include the compiler directive that tells the PocketC compiler to link in the library when compiling and executing your code.

To do that, include the line: library "PktCSysLib" in your program before using any of the functions defined by PktCSysLib. Keep in mind that you must use the exact case as specified in the library line above and in the example below.

Example Source Code

// PktCSysLibTest

library "PktCSysLib"

main() {
  int secs;

  if (GetSystemFeature(7)) // do we have a backlight?
    Backlight(1);          // yes, turn it on!

  secs = GetAutoOffTime();

  if (secs) {
    puts("Pilot will turn off in ");
    puts(secs);
    puts("seconds");
  }
  else
    puts("Pilot is set to not turn off.");

  puts("\n");
}

Release History


Updated: 8 December 1998