Skip to content

jeffmerkey/netware-cworthy-linux

Repository files navigation

Copyright(c) Jeff V. Merkey 1997-2019.  All rights reserved.
Open CWorthy Look Alike Terminal Library.

Licensed under the Lesser GNU Public License (LGPL) v2.1.

Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.  No representations are made about the suitability of
this software for any purpose.  It is provided "as is" without express or
implied warranty.

For those folks who liked the Novell NetWare Network Administration
tools, this library is an open source version of the Standard Novell CWorthy
interface.  The current library works under DOS, Windows, and Linux.

This library uses the standard DOS screen color attributes which have been
mapped to ncurses in Linux, and the Microsoft Windows Terminal API's.

The DOS build of this library uses the DOS standard 0xB8000 CGA direct
screen read/write interface.

The Linux build maps to ncurses and supports most terminal types including
Xterm, linux, and the VT100 or greater terminal types.  The interface can
be programmed to support a wide range of terminal types at both compile and
run time and to display the output as either simple text or special chars
specific to the detected or specified terminal type.  Unicode and other
special chars are fully supported for Linux, Xterm, and VT100 or greater
terminal types.

The Linux build and Windows build both create a library file which can
be linked from applications which use the Open Cworthy library.  The Linux
build creates both dynamic linking shared object files (libcworthy.so)
and statically linked ar (archive) files (libcworthy.a).  The Windows build
creates a cworthy.lib file which CWorthy apps can link to.  See the
Makefile.windows file for examples.  The DOS build uses the DJGPP compiler
and tools which like Linux also creates a statically linked ar (archive)
file (lcworthy.a).   

This Cworthy library includes an implementation of the NetWare SMP 
worm screensaver.  This screen saver uses ncurses and is text based which
is identical to the Novell Netware SMP multi processor screensaver which
displayed a color coded worm for each processor running.  As each processor
load increases on a particular processor, the longer the worm becomes and
the faster it moves across the screen corresponding to that particular
processor.  As the overall system load average across the system increases,
the base clock rate for all the worms increases slightly to indicate 
load average is increasing.

A sample Open CWorthy linux application called "ifcon" is included which
resembles the Netware management console and displays linux network interface 
statistics and provides a good example as to how the library is used.  
If you let the console sit idle for 10 minutes (default), the Netware SMP
worm screensaver will activate.  The screensaver delay can be altered by 
calling set_screensaver_interval(int seconds);

i.e.  prev_seconds = set_screensaver_interval(seconds);

TODO;

The portal field functions for large forms is being reworked to add 
the ability to dynamically resize the screen and map to sliding windows.

BUILD

Set the platform build value in cworthy.h.
Only chose one option for either DOS, Linux,
or Windows NT set to the value of 1.

#define LINUX_UTIL       1  <- select Linux build
#define DOS_UTIL         0
#define WINDOWS_NT_UTIL  0


DOS
---

Install the DJGPP Compiler and tools
on DOS or Windows.  Tested on DJGPP
gcc-4.44 version and gcc-9.0

make -f Makefile.dos clean
make -f Makefile.dos


WINDOWS
-------

Install the Windows SDK from Microsoft.
Tested on Microsoft Windows SDK

nmake -f Makefile.windows clean
nmake -f Makefile.windows


Linux
-----

You must have the ncurses-devel packages installed in order to make
ncurses apps on your linux system.  you can try "yum install ncurses*" to get 
all of the ncurses packages for RedHat and CentOS systems.  This version 
was developed on a Red Hat 7 / CentOS 7 system. 

to make, type:

# make -f Makefile <enter>

the build process should display:

g++ -g -c -O3  -fPIC -Wall cworthy.c 
g++ -g -c -O3  -fPIC -Wall netware-screensaver.c 
ld -shared -lc -o libcworthy.so cworthy.o netware-screensaver.o
ar r libcworthy.a cworthy.o netware-screensaver.o
g++ -g -O3 ifcon.c -Wall -o ifcon -lncursesw -lpthread libcworthy.a

alternatively, to link to the shared object library instead of statically
linking, change the Makefile or use the following syntax for the ifcon
build:

g++ -g -O3 ifcon.c -Wall -o ifcon -lncursesw -lpthread -lcworthy


to perform a clean build:

# make -f Makefile clean <enter>

should display:

rm -rf *.o libcworthy.so libcworthy.a ifcon


INSTALLING/UNINSTALLING:

To install:

# make -f Makefile install <enter>

should display:

install -m 0755 ifcon /usr/bin
install -m 0755 libcworthy.so /usr/lib
install -m 644 libcworthy.a /usr/lib
install -m 644 cworthy.h /usr/include
ldconfig
ldconfig

To uninstall:

# make -f Makefile uninstall <enter>

should display:

rm -vf /usr/bin/ifcon
removed ‘/usr/bin/ifcon’
rm -vf /usr/lib/libcworthy.so
removed ‘/usr/lib/libcworthy.so’
rm -vf /usr/lib/libcworthy.a
removed ‘/usr/lib/libcworthy.a’
rm -vf /usr/include/cworthy.h
removed ‘/usr/include/cworthy.h’
ldconfig
ldconfig

About

Netware Open CWorthy Interface on Linux/DOS/Windows (Linux build includes an integrated Netware SMP worm screensaver)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published