From 7bf7a9e102fb8dda04ed049f5e38606580e3f84e Mon Sep 17 00:00:00 2001 From: "info@sandroid.org" Date: Tue, 30 Jun 2009 19:46:52 +0000 Subject: [PATCH] Extended the feature farther with , which allows the HTML insert to be read from a source file. This makes it easier to add the same notice to a bunch of source files and then to easily maintain it afterward. This has been illustrated by adding the sample file AgcHtmlNotice.txt and inserting it into Luminary131's GROUND_TRACKING_DETERMINATION_PROGRAM.s. --- AgcHtmlNotice.txt | 11 +++++++ .../GROUND_TRACKING_DETERMINATION_PROGRAM.s | 1 + yaYUL/SymbolTable.c | 33 +++++++++++++++++-- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 AgcHtmlNotice.txt diff --git a/AgcHtmlNotice.txt b/AgcHtmlNotice.txt new file mode 100644 index 000000000..67cc5d49e --- /dev/null +++ b/AgcHtmlNotice.txt @@ -0,0 +1,11 @@ + + + + + + + +
This is a program for the Apollo Guidance Computer (AGC).  +Documentation of AGC assembly language, the AGC register structure, and the AGC memory map can be found at the Virtual AGC website.
+
+ diff --git a/Luminary131/GROUND_TRACKING_DETERMINATION_PROGRAM.s b/Luminary131/GROUND_TRACKING_DETERMINATION_PROGRAM.s index 1861fba65..7ffb8b1be 100644 --- a/Luminary131/GROUND_TRACKING_DETERMINATION_PROGRAM.s +++ b/Luminary131/GROUND_TRACKING_DETERMINATION_PROGRAM.s @@ -13,6 +13,7 @@ # Mod history: 05/21/03 RSB. Began transcribing. # 05/14/05 RSB Corrected website reference above. + # Page 661 # GROUND TRACKING DETERMINATION PROGRAM -- P21 # diff --git a/yaYUL/SymbolTable.c b/yaYUL/SymbolTable.c index 072d2a7aa..f6cbf44f8 100644 --- a/yaYUL/SymbolTable.c +++ b/yaYUL/SymbolTable.c @@ -48,6 +48,7 @@ to a dimmer bluish color. 06/30/09 RSB Added HtmlCheck for processing "..." stuff in source files. + Includes and . Concerning the concept of a symbol's namespace. I had originally intended to implement this, and so many functions had a namespace @@ -203,17 +204,45 @@ HtmlClose (void) // turns the default HTML styling back on. // // Also accepts "...", where n is a decimal number from -// 1 to 100. In this case, it embeds the HTML within a centered table +// 1 to 99. In this case, it embeds the HTML within a centered table // which is n% of the width of the display. +// +// Also accepts (no closing tag needed), in which case +// html will be imported from the indicated file (at the yaYUL or yaLEMAP +// is run, not at browse-time) if the file exists. If the file does not +// exist, it is not treated as an error. The purpose of this feature is +// to allow a common notice to be added to a group of files, but to +// eliminate that notice easily by removing the file containing it. int HtmlCheck (int WriteOutput, FILE *InputFile, char *s, int sSize, char *CurrentFilename, int *CurrentLineAll, int *CurrentLineInFile) { int Width; char c = 0; + if (!strncmp (s, "", 6) || (2 == sscanf (s, " 0 && Width <= 100 && c == '>')) + Width > 0 && Width <= 99 && c == '>')) { char *ss; // Turn off default HTML styling.