commands

commands - TRACE'c words void fn_make(inode_state&state...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include "commands.h" #include "trace.h" commands::commands(): map (commandmap()) { map["cat" ] = fn_cat ; map["cd" ] = fn_cd ; map["echo" ] = fn_echo ; map["exit" ] = fn_exit ; map["ls" ] = fn_ls ; map["lsr" ] = fn_lsr ; map["make" ] = fn_make ; map["mkdir" ] = fn_mkdir ; map["prompt" ] = fn_prompt ; map["pwd" ] = fn_pwd ; map["rm" ] = fn_rm ; } return map[cmd]; } TRACE ('c', words); } TRACE ('c', words); } TRACE ('c', words); } TRACE ('c', words); exit (exit_status_message()); } TRACE ('c', words); }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: TRACE ('c', words); } void fn_make (inode_state &state, const wordvec &words){ TRACE ('c', words); } void fn_mkdir (inode_state &state, const wordvec &words){ TRACE ('c', words); } void fn_prompt (inode_state &state, const wordvec &words){ TRACE ('c', words); } void fn_pwd (inode_state &state, const wordvec &words){ TRACE ('c', words); } void fn_rm (inode_state &state, const wordvec &words){ TRACE ('c', words); } void fn_rmr (inode_state &state, const wordvec &words){ TRACE ('c', words); } int exit_status_message() { int exit_status = exit_status::get(); cout << execname() << ": exit(" << exit_status << ")" << endl; return exit_status; } RCSC(commands_cc, "$Id: commands.cc,v 1.9 2009-01-20 14:08:12-08 - - $")...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

commands - TRACE'c words void fn_make(inode_state&state...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online