Network communications, circa 1947.

Arrange Project

by: burt rosenberg
at: university of miami
date: jan 2020

Goals

The goals of this project are: Note: The photo shows a Helen Soros working the pneumatic tube system used to take cash at Marshall Fields store in Chicago, November 26, 1947.

Man Page

NAME
    arrange -- parse a command argument and store in a linked list
    
SYNOPSIS 
    arrange [-v] [-r _remove_words_] _insert_words_

DESCRIPION

    Given an argument in the format 

        _word1_:_word2_:...:_wordn_ 

    parse the argument at the colons, and place the words in a linked list.
 
    Note that ":" literally the colon-character. Assume _name?_ are a sequence of letters
    and possibly numbers, the period, or a hyphen.

    The following options are available:
    
    -v Verbose output; multiple uses increases verbose level
    -r takes argument remove_words, of the same format as the command argument; after 
       inserting the words, parse remove_words and for each word found in the linked list,
       remove it.
    
    Note that an empty name on input ("::") should be discarded. 
    
HISTORY
    Introduced in csc424.162 as arrange-h-e, based on a sub-task in the netbounce project.
    Revived in csc424.202 to include removal.
    
BUGS

	

Specific steps

To get started:

Discussion

First get class/example/hello-world working. Reading the contents of the makefile will remind you of the install commands needed to get the C complier and other build tools installed on your AWS instance.

The struct for the linked list is given. The function new_ll shows how to use malloc to allocate memory for a struct, and some other syntax. Note that this linked list uses a dummy header. An empty list contains one node, the dummy header. All the "real" nodes go after this header. The point of this convention is that an empty list has the same type as a non-empty list.

The makefile provided demonstrates macros and built-in macros.

A makefile is a sequence of stanzas with a target, dependencies and a recipe. The target and dependencies start the stanza with a colon between the target and the dependencies. The lines following this line are indented with a TAB (must be a tab!) and are run one by one.

The rule is, if the target is required, or asked for, and it is out of date with respect to the dependencies noted, then run all the lines in the recipe. Targets can require other targets, creating a cascade to rebuild everything that needs to be rebuilt to create a fully up to date target.

Certain standard targets exist. The first stanza is the default for make without a target asked. Make clean invokes the clean target, which is customarily used to clean up all build products, returning the directory to only the sources. A make basic-test will be used to test your code against a standard reference file. A basic-test does not mean your code fully functions, just that you have achieved a functionality suitable for generally 3 out of 5 points in grading.

When submitting, Do Not Submit Build Products!. Your grade will be lowered. In the repostory will be only source files. For the purposes of this course, binaries in the repository are a useless burden.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

author: burton rosenberg
created: 26 jan 2020
update: 26 jan 2020