Change HTML4 entities to HTML5

&lt to <
&gt to >
&amp to &
This commit is contained in:
James Gregory 2013-12-30 14:33:39 +11:00
commit b8e7ce7165
105 changed files with 1117 additions and 1117 deletions

View file

@ -45,11 +45,11 @@
the variable-sized blocks may contain any number of data entries,
stored as an array of structures within the block. */
#include &ltstdio.h&gt
#include <stdio.h>
#ifdef __TURBOC__
#include &ltalloc.h&gt
#include <alloc.h>
#else
#include &ltmalloc.h&gt
#include <malloc.h>
#endif
void main(void);
@ -78,12 +78,12 @@ void main(void) {
struct BlockHeader **LastBlockPointer;
printf(”ID # for which to find average: “);
scanf(”%d”,&ampIDToFind);
scanf(”%d”,&IDToFind);
/* Build an array across 5 blocks, for testing */
/* Anchor the linked list to BaseArrayBlockPointer */
LastBlockPointer = &ampBaseArrayBlockPointer;
LastBlockPointer = &BaseArrayBlockPointer;
/* Create 5 blocks of varying sizes */
for (i = 1; i &lt 6; i++) {
for (i = 1; i < 6; i++) {
/* Try to get memory for the next block */
if ((WorkingBlockPointer =
(struct BlockHeader *) malloc(sizeof(struct BlockHeader) +
@ -91,7 +91,7 @@ void main(void) {
exit(1);
}
/* Set the # of data elements in this block */
WorkingBlockPointer-&gtBlockCount = i * 10;
WorkingBlockPointer->BlockCount = i * 10;
/* Link the new block into the chain */
*LastBlockPointer = WorkingBlockPointer;
/* Point to the first data field */
@ -99,16 +99,16 @@ void main(void) {
(struct DataElement *) ((char *)WorkingBlockPointer +
sizeof(struct BlockHeader));
/* Fill the data fields with ID numbers and values */
for (j = 0; j &lt (i * 10); j++, WorkingDataPointer++) {
WorkingDataPointer-&gtID = j;
WorkingDataPointer-&gtValue = i * 1000 + j;
for (j = 0; j < (i * 10); j++, WorkingDataPointer++) {
WorkingDataPointer->ID = j;
WorkingDataPointer->Value = i * 1000 + j;
}
/* Remember where to set link from this block to the next */
LastBlockPointer = &ampWorkingBlockPointer-&gtNextBlock;
LastBlockPointer = &WorkingBlockPointer->NextBlock;
}
/* Set the last block’s “next block” pointer to NULL to indicate
that there are no more blocks */
WorkingBlockPointer-&gtNextBlock = NULL;
WorkingBlockPointer->NextBlock = NULL;
printf(”Average of all elements with ID %d: %u\n”,
IDToFind, FindIDAverage(IDToFind, BaseArrayBlockPointer));
exit(0);
@ -140,18 +140,18 @@ unsigned int FindIDAverage(unsigned int SearchedForID,
/* Search all the DataElement entries within this block
and accumulate data from all that match the desired ID */
for (WorkingBlockCount=0;
WorkingBlockCount&ltBlockPointer-&gtBlockCount;
WorkingBlockCount<BlockPointer->BlockCount;
WorkingBlockCount++, DataPointer++) {
/* If the ID matches, add in the value and increment the
match counter */
if (DataPointer-&gtID == SearchedForID) {
if (DataPointer->ID == SearchedForID) {
IDMatchCount++;
IDMatchSum += DataPointer-&gtValue;
IDMatchSum += DataPointer->Value;
}
}
/* Point to the next block, and continue as long as that pointer
isn’t NULL */
} while ((BlockPointer = BlockPointer-&gtNextBlock) != NULL);
} while ((BlockPointer = BlockPointer->NextBlock) != NULL);
/* Calculate the average of all matches */
if (IDMatchCount == 0)
return(0); /* Avoid division by 0 */
@ -170,7 +170,7 @@ unsigned int FindIDAverage(unsigned int SearchedForID,
<PRE>
; Code generated by Microsoft C for inner loop of FindIDAverage.
;|*** for (WorkingBlockCount=0;
;|*** WorkingBlockCount&ltBlockPointer-&gtBlockCount;
;|*** WorkingBlockCount&lt;BlockPointer-&gt;BlockCount;
;|*** WorkingBlockCount++, DataPointer++) {
mov WORD PTR [bp-6],0 ;WorkingBlockCount
mov bx,WORD PTR [bp+6] ;BlockPointer
@ -181,13 +181,13 @@ unsigned int FindIDAverage(unsigned int SearchedForID,
mov di,WORD PTR [bp-2] ;IDMatchSum
mov dx,WORD PTR [bp-4] ;IDMatchCount
$L20004:
;|*** if (DataPointer-&gtID == SearchedForID) {
;|*** if (DataPointer-&gt;ID == SearchedForID) {
mov ax,WORD PTR [si]
cmp WORD PTR [bp+4],ax ;SearchedForID
jne $I265
;|*** IDMatchCount++;
inc dx
;|*** IDMatchSum += DataPointer-&gtValue;
;|*** IDMatchSum += DataPointer-&gt;Value;
add di,WORD PTR [si+2]
;|*** }
;|*** }