misc.h File Reference

Go to the source code of this file.

Data Structures

struct  sock_hostport
struct  parse_list

Functions

void p_help ()
void strip_nl (char *data)
int str_begin (char *src, char *pat)
void parse_pwd (char *pwd, char *dir)
void p_header (char *host, char *dir)
void nullify (struct parse_list *head)
void fnullify (struct parse_list *head)
parse_listfscan (struct parse_list *head, char *filter)


Detailed Description

Miscellaneous functions.

Function Documentation

void fnullify ( struct parse_list head  ) 

Simliar to nullify, except doesn't free the lp member. For filtered lists.

Parameters:
head The container of all this soon-to-be-free stuff.

struct parse_list* fscan ( struct parse_list head,
char *  filter 
)

Used with the filtering. This builds a linked list of all the filenames that match the given filter.

Parameters:
head The head of the entire directory listing.
filter The given name filter.
Returns:
Pointer to the head of the filtered list.

void nullify ( struct parse_list head  ) 

Frees head, the lp member inside of head, and the name member inside of that.

Parameters:
head The container of all this soon-to-be-free stuff.

void p_header ( char *  host,
char *  dir 
)

Easier way to print the header up top.

Parameters:
host Current hostname.
dir Current directory.

void p_help (  ) 

Prints a helpful message using the "less" pager.

void parse_pwd ( char *  pwd,
char *  dir 
)

Parses the output of PWD to find out what directory we're in.

Parameters:
pwd Output of PWD.
dir The directory name will be put in this address.

int str_begin ( char *  src,
char *  pat 
)

Tests to see whether the string src begins with the string pat.

Parameters:
src What to search in.
pat The pattern to match.
Returns:
1 for success, else 0.

void strip_nl ( char *  data  ) 

Strips out CR and LF from the end of something.

Parameters:
data What will be stripped.


Generated by  doxygen 1.4.7.
SourceForge.net Logo