Thinking in C and *nix (CSC 295/282 2014S) : Outlines
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] [FAQ] [Teaching & Learning] - [Calendar]
Current: [Outline] [EBoard] [Lab] [Assignment]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines]
Reference: [EBook] - [ISO] [GNU Coding Standards] [GCC Documentation] - [TAoUP] [Make3]
Related Courses: [CSC 295 2013S]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker]
Held: Thursday, 13 February 2014
Back to Outline 03 - The Bash Shell - A Refresher. On to Outline 05 - Learning Vi.
Summary
We consider how we might write a program that "cleans up" a
typescript file created by script.
Related Pages
Overview
Administrivia
Why did Sam give you this assignment?
esc [ Kod -a typescriptman asciiLINE_MAX is supposed to be in <limits.h> (see examples/linemax.c)
/usr/include/x86_64-linux-gnu/bits/posix2_lim.hvi session.Given that analysis, what should our algorithm look like?
while input characters remain
ch = next character
switch ch
case backspace:
remove the last character in the buffer
case 'n':
print the buffer, reset
case '\r'
ignore the character
case escape
read two more characters, which will almost be [ and something
ignore them
default
add the character to the buffer
print whatever remains in the buffer
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] [FAQ] [Teaching & Learning] - [Calendar]
Current: [Outline] [EBoard] [Lab] [Assignment]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines]
Reference: [EBook] - [ISO] [GNU Coding Standards] [GCC Documentation] - [TAoUP] [Make3]
Related Courses: [CSC 295 2013S]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker]
Copyright (c) 2013-14 Samuel A. Rebelsky.

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this
license, visit http://creativecommons.org/licenses/by/3.0/
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.