home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tv20cpp.zip / tvision / util.h < prev    next >
C/C++ Source or Header  |  1999-05-21  |  1KB  |  64 lines

  1. /*
  2.  * util.h
  3.  *
  4.  * Turbo Vision - Version 2.0
  5.  *
  6.  * Copyright (c) 1994 by Borland International
  7.  * All Rights Reserved.
  8.  *
  9.  * Modified by Sergio Sigala <ssigala@globalnet.it>
  10.  */
  11.  
  12. #if !defined( __UTIL_H )
  13. #define __UTIL_H
  14.  
  15. inline int min( int a, int b )
  16. {
  17.     return (a>b) ? b : a;
  18. }
  19.  
  20. inline int max( int a, int b )
  21. {
  22.     return (a<b) ? b : a;
  23. }
  24.  
  25. void fexpand( char * );
  26. void backSlash2Slash( char * path );
  27. void Slash2backSlash( char * path );
  28.  
  29. char hotKey( const char *s );
  30. ushort ctrlToArrow( ushort );
  31. char getAltChar( ushort keyCode );
  32. ushort getAltCode( char ch );
  33. char getCtrlChar(ushort);
  34. ushort getCtrlCode(uchar);
  35.  
  36. ushort historyCount( uchar id );
  37. const char *historyStr( uchar id, int index );
  38. void historyAdd( uchar id, const char * );
  39.  
  40. int cstrlen( const char * );
  41.  
  42. class TView;
  43. void *message( TView *receiver, ushort what, ushort command, void *infoPtr );
  44. Boolean lowMemory();
  45.  
  46. char *newStr( const char * );
  47.  
  48. Boolean isDir( const char *str );
  49.  
  50. Boolean pathValid( const char *path );
  51.  
  52. Boolean validFileName( const char *fileName );
  53.  
  54. void getCurDir( char *dir );
  55.  
  56. Boolean isWild( const char *f );
  57.  
  58. // from system.cc
  59.  
  60. void expandPath(const char *path, char *dir, char *file);
  61. //long int filelength(int fd);
  62.  
  63. #endif  // __UTIL_H
  64.