CTWM
Loading...
Searching...
No Matches
Macros | Functions | Variables
/usr/src/RPM/BUILD/ctwm-4.1.0/util.h File Reference
#include <ctype.h>
#include <stdio.h>
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX(x, y)   (max(x,y))
 
#define MIN(x, y)   (min(x,y))
 
#define ABS(x)   ((x)<0?-(x):(x))
 
#define Isascii(c)   isascii((int)(unsigned char)(c))
 
#define Isdigit(c)   isdigit((int)(unsigned char)(c))
 
#define Islower(c)   islower((int)(unsigned char)(c))
 
#define Isupper(c)   isupper((int)(unsigned char)(c))
 
#define Tolower(c)   tolower((int)(unsigned char)(c))
 
#define Toupper(c)   toupper((int)(unsigned char)(c))
 

Functions

static int max (int a, int b)
 
static int min (int a, int b)
 
charExpandFilename (const char *name)
 
charExpandFilePath (char *path)
 
void GetColor (int kind, Pixel *what, const char *name)
 Get info from the server about a given color.
 
void GetShadeColors (ColorPair *cp)
 Try and create a 'shaded' version of a color for prettier UI.
 
bool UpdateFont (MyFont *font, int height)
 Try adjusting a font's height.
 
void CreateFonts (ScreenInfo *scr)
 Load up our various defined fonts.
 
void RescueWindows (void)
 Backend for f.rescuewindows.
 
void DebugTrace (char *file)
 Backend for f.trace.
 
void safe_strncpy (char *dest, const char *src, size_t size)
 

Variables

FILEtracefile
 

Macro Definition Documentation

◆ ABS

#define ABS ( x)    ((x)<0?-(x):(x))

Definition at line 42 of file util.h.

Referenced by OtpScrPriorityL(), OtpScrSetZero(), and OtpSetPriority().

◆ Isascii

#define Isascii ( c)    isascii((int)(unsigned char)(c))

Definition at line 51 of file util.h.

Referenced by CheckWarpScreenArg().

◆ Isdigit

#define Isdigit ( c)    isdigit((int)(unsigned char)(c))

Definition at line 52 of file util.h.

Referenced by ChangeSize(), and CheckWarpScreenArg().

◆ Islower

#define Islower ( c)    islower((int)(unsigned char)(c))

Definition at line 53 of file util.h.

Referenced by HandleKeyPress().

◆ Isupper

#define Isupper ( c)    isupper((int)(unsigned char)(c))

Definition at line 54 of file util.h.

Referenced by HandleKeyPress().

◆ MAX

#define MAX ( x,
y )   (max(x,y))

◆ MIN

#define MIN ( x,
y )   (min(x,y))

Definition at line 39 of file util.h.

Referenced by _tryToPack(), FindConstraint(), OwlEffectivePriority(), and SetupOccupation().

◆ Tolower

#define Tolower ( c)    tolower((int)(unsigned char)(c))

Definition at line 55 of file util.h.

Referenced by HandleKeyPress().

◆ Toupper

#define Toupper ( c)    toupper((int)(unsigned char)(c))

Definition at line 56 of file util.h.

Function Documentation

◆ CreateFonts()

void CreateFonts ( ScreenInfo * scr)

Load up our various defined fonts.

Definition at line 383 of file util.c.

References ScreenInfo::HaveFonts, LOADFONT, and PlaceX.

Referenced by AddToMenu(), and ctwm_main().

◆ DebugTrace()

void DebugTrace ( char * file)

Backend for f.trace.

Definition at line 553 of file util.c.

References PlaceX, and tracefile.

Referenced by f_trace_impl().

◆ ExpandFilename()

char * ExpandFilename ( const char * name)

Definition at line 131 of file util.c.

References Home, and PlaceX.

Referenced by FindBitmap().

◆ ExpandFilePath()

char * ExpandFilePath ( char * path)

Definition at line 67 of file util.c.

References Home, HomeLen, len, and PlaceX.

Referenced by do_string_keyword().

◆ GetColor()

void GetColor ( int kind,
Pixel * what,
const char * name )

◆ GetShadeColors()

void GetShadeColors ( ColorPair * cp)

◆ max()

static int max ( int a,
int b )
inlinestatic

◆ min()

static int min ( int a,
int b )
inlinestatic

◆ RescueWindows()

void RescueWindows ( void )

◆ safe_strncpy()

void safe_strncpy ( char * dest,
const char * src,
size_t size )

Definition at line 586 of file util.c.

References PlaceX.

Referenced by GetMaskFromProperty(), RedirectToCaptive(), and SetupOccupation().

◆ UpdateFont()

bool UpdateFont ( MyFont * font,
int height )

Try adjusting a font's height.

Used in drawing the icon manager.

Definition at line 292 of file util.c.

References MyFont::avg_count, MyFont::avg_fheight, MyFont::avg_height, and PlaceX.

Referenced by DrawIconManagerIconName().

Variable Documentation

◆ tracefile

FILE* tracefile
extern

Definition at line 59 of file util.c.

Referenced by DebugTrace(), dumpevent(), TryToAnimate(), and WMapRestack().