==========
To Do List
==========

This is a fine grained list of coding and documenting tasks that need
to be done. Feel free to update once you have done something :)

Notes:
  - Any file that doesn't still need a format audit should only be edited
    with care (as is always the case). Be sure not to break the formatting.
  - Done. = Done barring bugs and porting, all functionality is implemented.
  - a "!!!" in the code denotes a problem or unfinished section.

------
CODING
------

lib/*
  header audit - not all system headers may be needed once coding is done.
  review headers for unwanted "leaks" or collitions into public headers
    and add #undef's where needed (1)
  struct alignment audit
  review all const and static usage

lib/testlib
  make sure everything not automateable is tested somewhere
  spawned process tests, signals, etc.

make/*
  integrate fortran settings

-- os/cpu layer --

lib/cosmfile (1)
  make a helper function for mkdir stuff, DirOpen is a mess
  file lock issues
    error handling in FileClose
    verify file locks are checked even if not currently locking
    generic file lock system
  v3FileTruncate and all lock tests need to be added
  format and code audit (tests memory leak)

lib/cosmio (1)
  v3Input code, test in testlib
  v3f64A/U code
  Unicode handling in v3InputU and v3_PrintChar
  v3_Print %f, %g, %F, %G, auditing of NAN etc.
  tests
    v3Str*
    Finish test setups and loops for  %u/v/w, %i/j/k, %X/Y/Z, %f/g/%F/%G,
	  and move them to testlib.c - far too much overhead to be in the lib.
    Implement %c, %p, %s, %b tests
  test audit
  unicode function character code audits

lib/cosmnet (1)
  UDP:
    modify for "connectionless" UDP mode - all UDP should be
    add UDP test cases for v3_TestCosmNet
  add my_ip and my_host tests
  ACL function tests, my_host/my_port tests
  code and test audit

lib/cosmtask (1)
  MutexLock needs it's own protection during init.
  find a place to test:
    v3ThreadPriority, CPUGet/Lock/Unlock, and MutexLock/Unlock in cosmtask
    v3ProcessPriority in testlib
  add comments to SignalRegister docs about not calling functions
  test audit

lib/cosmmath (1)
  Done.

lib/cosmmem (1)
  Done.

lib/cosmgui
  *

lib/cputypes (1)
  Done.

lib/cosm.h
  Expand the list of unsafe ANSI functions
  List of depreciated functions
  todo: ctypes, locale, stdio, stdlib, string, time
    ref: http://www.infosys.utas.edu.au/info/documentation/C/CStdLib.html

-- utility layer --

lib/buffer
  code audit
  test audit

lib/email
  Done.

lib/log
  test audit

lib/config
  code audit

lib/security
  v3Random
  add remaining APIs (Duncan)
  remove debug code
  format audit
  code audit

lib/cosmtime
  v3TimeSet code (cannot be done until packets are defined)
  v3TimeUnits/v3TimeDigest code for years before xxx?
  v3TimeCorrectionLoad/Save, mutex issues
  Leap seconds format and code
  tests
  format audit
  code audit

lib/speed
  v3SpeedFloat
    integrate MFLOPS code
  v3SpeedInt
    find an algorithm
  tests
  format audit
  code audit

lib/compress
  code
  tests
  format audit
  code audit
  lib/bzip2
    test against reference code by using our library and their test code
    remove all the mid-function declarations.
    group/sort functions and declarations to match
    convert macro's with declarations to functions.
    convert macro's used many times to functions for smaller binary code?

lib/language
  *

lib/cosmtest
  Done.

-------------
DOCUMENTATION
-------------

doc/*
  format/code audit of examples
  update error codes
  make sure functions that dont work in all OS's are marked (like v3MemSystem)

doc/html2man.pl
  Done.

-- os/cpu layer --

doc/cputypes
  Done.

doc/cosmmem
  checking

doc/cosmio
  examples for v3StrStrA, v3StrStrU, v3{type}A, v3{type}U
  checking

doc/cosmfile
  checking

doc/cosmmath
  checking

doc/cosmnet
  examples for v3NetSendUDP and v3NetRecvUDP
  v3NetACL* errors and examples
  checking

doc/cosmtask
  v3MutexFree example
  checking

doc/cosmgui
  *

-- utility layer --

doc/cosm.h
  Done.

doc/buffer
  checking

doc/email
  Done.

doc/log
  v3LogClose example
  fix error codes - need code fixes, see above
  checking

doc/config
  fix configOpen docs, remove unneeded comments about format
  errors
  checking

doc/security
  v3Random() errors and examples
  checking

doc/cosmtime
  examples
  checking

doc/speed
  errors
  checking

doc/compress
  errors and examples
  checking

doc/language
  *

-------
Porting
-------

MacOS
  find someone to actually do the MacOS port
  fix all the "!!!" comments

BeOS
  priority functions
  yield issues

Win32
  v3ProcessSpawn is getting a handle, not a pid
  GetSystemTime() in v3SystemClock resolution is terrible, find better.
  All the v3File* functions NEED to get ported to win32 APIs
  replace mkdir() with Win32 API function

OS/2
  v3_Priority*

IRIX
  issues with va_arg() and typecasting in v3Print* on irix-mips with gcc?

Unix
  v3Sleep() returns if any signal is received.
  echo in v3Input* for other Unix (done for Linux, FreeBSD, IRIX, OSF)

------------
OPTIMIZATION
------------

Optimizations are the _lowest_ priority tasks, and should only be done
after all other code is done, tested, and audited. But below is a list
of known non-optimial code.

CPU/OS
------
lib/*
  optimize functions with u64 lengths for <2^32 with double loop
lib/cosmio:
  v3_PrintChar needs a length added for speed (and probably renamed)
lib/cosmmath
  Div and Mul functions

UTIL
----
lib/
  ...