home *** CD-ROM | disk | FTP | other *** search
- *** Please Read the following information ***
-
- You can make this sample.log file by running the batch file named
- sample.bat (see readme.scc).
-
- This file should be viewed from within the SCC VIEW utility.
- Therefor start SCC by typing in at the prompt "SCC /v,sample.log" or
- use SCC VIEW menu selection. This will bring up the SCC VIEW utility
- with this file displayed. Then continue reading the following.
-
- The comments on the right hand side such as "Ignore numbers",
- "Ignore white space" are only to aid in the
-
- Ignore numbers
- Ignore white space
-
- interpretation of how various option settings has on the SCC generated
- log. These comments are put in as part of the original text file and
- are not generated by SCC.
-
- Some of the "LOG" options set (see above log header) for this
- example should be set as:
-
- Strip End White = No strip ending white space from Old/New
- Ignore Case = Yes
- Ignore White = Yes
- Ignore Numbers = Yes
-
- If you have a color monitor, please note:
-
- 1) Main "text" screen attributes (foreground/background):
-
- o CONTROL = High White & Blue Background.
- o Old Document = Light White & Blue Background.
- o New Document = Yellow & Blue Background.
-
- 2) Cursor line attributes:
-
- o Cursor = Black & Cyan Background.
-
- For the help menu, press the F1 key.
-
- When the cursor is on a Log line and its left control side has
- either a '-', or '+' then one of the following line operations apply.
-
- Log status Operation
- ---------- ---------
- '-' " Deleted Line "
- '+' " Inserted Line "
-
- When the cursor is on a Log line and its left control side equals
- a blank character ' ' then both old/new lines are identical except
- for one or more of the following attributes.
-
- Log status Operation
- ---------- ---------
- ' ' Common Lines old/new lines are identical
- ' ' Moved Line old/new lines are identical
- ' ' Ignore White Sp
- ' ' Ignore Numbers
- ' ' Ignore Case
- ' ' Multi Match
-
- The above Log status (along with different SCC Log option
- settings) can help generate a "filtered" SCC change control report.
- This report will show what is important (delete or insert status)
- and what is not important (blank status) in your file.
- For example you may want to ignore the '-' or '+' (delete or
- insert) status characters for such lines containing differences of
- only "White Space", "Upper/Lower Case" etc.
-
- START OF EXAMPLES.....
-
-
-
-
-
- new line (added)
- /********************************** new line (added)
- * moved line
- * put a poxxper terminoting close match
- * 9-MARCH-90 sample.v2 Ignore numbers
- * INPUT new line (added)
- * string pointer new line (added)
- * tab size new line (added)
- * new line (added)
- * RETURN new line (added)
- #include <stdio.h> Ignore white space
- #include <string.h> Ignore white space
-
- void DE_detab (char *buffer, int line_size, int tab_size);
-
-
- void DE_detab(string, max_lenth, tab_size)
- char *string;
- int max_lenth;
-
- int tab_size; Strip end white
- {
- int i;
- int index;
- int lenth;
- int delta;
- int move_from;
- int move_to;
-
- /*-----------------------------------------*
- * make room for a pxoper trailing '\0' string close match
- *-----------------------------------------*/ moved line
- register unsigned i; moved line
- * put a proper terminating close match
- NOW IS THE TIME Ignore case
- Now is x close match
- The quick Ignore white space
- goto 670 Ignore numbers
- let string 1 = \"brown\""}, moved line
- let string 2 = \"uic\""}, moved line
- /*--------------------------------------*
- * This lets us reference elements of array as 1 to n
- *--------------------------------------*/
- (char *)base -= element_width;
-
- /*--------------------------------------*
- * The following assignments to static variables reduce the
- * overhead of subroutine calls later.
- *--------------------------------------*/
- static_width = element_width;
- static_compare = compare;
- static_n_elements = n_elements;
- static_base = base;
-
- /*--------------------------------------*
- *
- *--------------------------------------*/
- temp_element = malloc (element_width);
-
- if (temp_element == NULL){
-
- /*--------------------------------------*
- *
- *--------------------------------------*/
- for (i = n_elements; i>1; i--){
- swap (1, i);
- heasaaafy (1, i-1);
- }
-
- /*--------------------------------------*
- *
- *--------------------------------------*/
- }
-
-
-
-
-
-
- /*--------------------------------------*
- *
- *--------------------------------------*/
- static void pascal
- swap (i, j)
- unsigned i;
- unsigned j;
- {
- register int temp_int;
- long temp_long;
-
- The quick brown close match
- The quick brown close match
- switch (static){
-
- case sizeof (int): temp_int = ((int *) static_base) [i];
- ((int *) static_base) [i] = ((int *) static_base) [j];
- ((int *) static_base) [j] = temp_int;
- break;
-
- case sizeof(long): temp_long = ((long *) static_base) [i];
- ((long *) static_base) [i] = ((long *) static_base) [j];
- ((long *) static_base) [j] = temp_long;
- break;
-
- case sizeof(char): temp_int = ((char *) static_base) [i];
- ((char *) static_base) [i] = ((char *) static_base) [j];
- ((char *) static_base) [j] = (char) temp_int;
- break;
-
- default: memcpy(temp_element,
- (char *)static_base + i*static_width,
- static_width);
-
- memcpy((char *) static_base + i*static_width,
- (char *) static_base + j*static_width,
- static_width);
-
- memcpy((char *) static_base + j*static_width,
- temp_element,
- static_width);
-
- break;
- }
- }
-
-
-
-
-
-
- /*--------------------------------------*
- *
- *
- *--------------------------------------*/
- static void pascal
- buildheap()
- {
- register unsigned element_number;
-
- /*--------------------------------------*
- *
- *--------------------------------------*/
- for (element_number = static_n_elements >> 1;
- element_number >= 1;
- element_number -- ){
-
- heasaaafy(element_number, static_n_elements);
- }
-
- }
-
-
-
-
-
-
- /*--------------------------------------*
- *
- *
- *--------------------------------------*/
- static void pascal
- heasaaafy (i,j)
- unsigned i;
- unsigned j;
- {
-
- /*--------------------------------------*
- * The following are static to avoid recursive stack overhead
- *--------------------------------------*/
- static unsigned son1i;
- static unsigned son2i;
- static unsigned k;
-
- static void *pson1;
- static void *pson2;
- new line (added)
- *--------------------------- moved line
- son1i = son1 (i); moved line
- switch (child_count (i, j)){ close match
- pson1 = pointer (son1i); Ignore white space
- saaa = pointer (i); moved line
- moved line
- case 0:
-
- /*--------------------------------------*
- *
- *--------------------------------------*/
- break;
-
- case 2: Strip end white
- /*--------------------------------------*
- *
- *--------------------------------------*/
- k = (*static_compare) (pson1, pson2) > 0 ? son1i : son2i;
- if ((*static_compare) (saaa, pointer (k)) < 0){
-
- /*--------------------------------------*
- *
- *--------------------------------------*/
- swap (i, k);
- heasaaafy (k, j);
- }
- break;
-
- case 1:
-
- /*--------------------------------------*
- *
- *--------------------------------------*/
- if ((*static_compare) (saaa, pson1) < 0){
-
- /*--------------------------------------*
- *
- *--------------------------------------*/
- swap (i, son1i);
- heasaaafy (son1i, j);
-
- }
- break;
- }
- }
-
- /*---------------------------------------------*
- * scan and replace all TAB char within string
- *---------------------------------------------*/
- for (index=0; string[index] && (index<max_lenth); index++){
-
- if (string[index] == '\t'){
- if (tab_size == 0){
-
- /*---------------------------------------------*
- * remove TAB by closing string
- *---------------------------------------------*/
- lenth = strlen(string);
-
- for (i=index; i<=lenth; i++){
- string[i] = string[i+1];
- }
- index--;
- continue;
- }
-
- /*---------------------------------------------*
- * replace Tab char with a Ignore case
- *---------------------------------------------*/
- string[index] = ' ';
- delta = tab_size-((index+1) % tab_size);
-
- if (delta && (delta < tab_size)){
-
- /*----------------- new line (added)
- * open up the stri new line (added)
- *----------------- new line (added)
- index++;
- move_from = strlen(&string[index]) + index + 1;
- move_to = move_from + delta;
- for ( ;move_from >= index; move_from--, move_to--){
- if (move_to < max_lenth){
-
- /*---------------------------------------------*
- * open only within the max_lenth of string
- *---------------------------------------------*/
- 5 string[move_to 67867840] Ignore numbers
- }
- }
-
- /*---------------------------------------------*
- * replace (delta lenth) with ' ' char within max_lenth
- *---------------------------------------------*/
- for (delta+=index; (index<delta) && (index<max_lenth); index++){
- string[index] = ' ';
- }
- index--;
- }
- }
- }
- if (index >= max_lenth){
-
- /*---------------------------------------------*
- * put a proper terminating '\0' on fully expanded string
- *---------------------------------------------*/
- }