Beispiel #1
0
char	*GetHostName()
{
	static	char	val[128];

	InternalVar = 1;
	sprintf	(val,"%s.%s",GetBoxName(),GetDomainName());
	InternalVar = 0;
	return	val;
}
Beispiel #2
0
void
nsBox::ListBox(nsAutoString& aResult)
{
    nsAutoString name;
    GetBoxName(name);

    char addr[100];
    sprintf(addr, "[@%p] ", static_cast<void*>(this));

    aResult.AppendASCII(addr);
    aResult.Append(name);
    aResult.AppendLiteral(" ");

    nsIContent* content = GetContent();

    // add on all the set attributes
    if (content) {
      nsCOMPtr<nsIDOMNode> node(do_QueryInterface(content));
      nsCOMPtr<nsIDOMNamedNodeMap> namedMap;

      node->GetAttributes(getter_AddRefs(namedMap));
      PRUint32 length;
      namedMap->GetLength(&length);

      nsCOMPtr<nsIDOMNode> attribute;
      for (PRUint32 i = 0; i < length; ++i)
      {
        namedMap->Item(i, getter_AddRefs(attribute));
        nsCOMPtr<nsIDOMAttr> attr(do_QueryInterface(attribute));
        attr->GetName(name);
        nsAutoString value;
        attr->GetValue(value);
        AppendAttribute(name, value, aResult);
      }
    }
}
Beispiel #3
0
bool CMesh::CreateBox(float width, float height, float depth)
{

	std::wstring plyFileName = GetBoxName();
	g_mapPlyInfo[plyFileName].maxExtent = width;
	g_mapPlyInfo[plyFileName].numberOfVertices = 24;

	//
	// Create the vertices.
	//

	int totalNumberOfVertices = 24 * 2;	// Make it a bit bigger.
	SimpleVertex* tempVertexArray = new SimpleVertex[ totalNumberOfVertices ];
	memset( tempVertexArray, 0, totalNumberOfVertices * sizeof( SimpleVertex ) );


	//Vertex v[24];

	float w2 = 0.5f*width;
	float h2 = 0.5f*height;
	float d2 = 0.5f*depth;

	// Fill in the front face vertex data.
	//v[0] = Vertex(-w2, -h2, -d2, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[0].Pos = XMFLOAT4(-w2, -h2, -d2, 1.0f);
	tempVertexArray[0].Normal = XMFLOAT4(0.0f, 0.0f, -1.0f, 1.0f);
	tempVertexArray[0].Tex = XMFLOAT2(0.0f, 1.0f);

	//v[1] = Vertex(-w2, +h2, -d2, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f);
	tempVertexArray[1].Pos = XMFLOAT4(-w2, +h2, -d2, 1.0f);
	tempVertexArray[1].Normal = XMFLOAT4(0.0f, 0.0f, -1.0f, 1.0f);
	tempVertexArray[1].Tex = XMFLOAT2(0.0f, 0.0f);

	//v[2] = Vertex(+w2, +h2, -d2, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f);
	tempVertexArray[2].Pos = XMFLOAT4(+w2, +h2, -d2, 1.0f);
	tempVertexArray[2].Normal = XMFLOAT4(0.0f, 0.0f, -1.0f, 1.0f);
	tempVertexArray[2].Tex = XMFLOAT2(1.0f, 0.0f);

	//v[3] = Vertex(+w2, -h2, -d2, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f);
	tempVertexArray[3].Pos = XMFLOAT4(+w2, -h2, -d2, 1.0f);
	tempVertexArray[3].Normal = XMFLOAT4(0.0f, 0.0f, -1.0f, 1.0f);
	tempVertexArray[3].Tex = XMFLOAT2(1.0f, 1.0f);


	// Fill in the back face vertex data.
	//v[4] = Vertex(-w2, -h2, +d2, 0.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f);
	tempVertexArray[4].Pos = XMFLOAT4(-w2, -h2, +d2, 1.0f);
	tempVertexArray[4].Normal = XMFLOAT4(0.0f, 0.0f, 1.0f, 1.0f);
	tempVertexArray[4].Tex = XMFLOAT2(1.0f, 1.0f);

	//v[5] = Vertex(+w2, -h2, +d2, 0.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[5].Pos = XMFLOAT4(+w2, -h2, +d2, 1.0f);
	tempVertexArray[5].Normal = XMFLOAT4(0.0f, 0.0f, 1.0f, 1.0f);
	tempVertexArray[5].Tex = XMFLOAT2(0.0f, 1.0f);

	//v[6] = Vertex(+w2, +h2, +d2, 0.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f);
	tempVertexArray[6].Pos = XMFLOAT4(+w2, +h2, +d2, 1.0f);
	tempVertexArray[6].Normal = XMFLOAT4(0.0f, 0.0f, 1.0f, 1.0f);
	tempVertexArray[6].Tex = XMFLOAT2(0.0f, 0.0f);

	//v[7] = Vertex(-w2, +h2, +d2, 0.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f);
	tempVertexArray[7].Pos = XMFLOAT4(-w2, +h2, +d2, 1.0f);
	tempVertexArray[7].Normal = XMFLOAT4(0.0f, 0.0f, 1.0f, 1.0f);
	tempVertexArray[7].Tex = XMFLOAT2(1.0f, 0.0f);


	// Fill in the top face vertex data.
	//v[8]  = Vertex(-w2, +h2, -d2, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[8].Pos = XMFLOAT4(-w2, +h2, -d2, 1.0f);
	tempVertexArray[8].Normal = XMFLOAT4(0.0f, 1.0f, 0.0f, 1.0f);
	tempVertexArray[8].Tex = XMFLOAT2(0.0f, 1.0f);

	//v[9]  = Vertex(-w2, +h2, +d2, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f);
	tempVertexArray[9].Pos = XMFLOAT4(-w2, +h2, +d2, 1.0f);
	tempVertexArray[9].Normal = XMFLOAT4(0.0f, 1.0f, 0.0f, 1.0f);
	tempVertexArray[9].Tex = XMFLOAT2(0.0f, 0.0f);

	//v[10] = Vertex(+w2, +h2, +d2, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f);
	tempVertexArray[10].Pos = XMFLOAT4(+w2, +h2, +d2, 1.0f);
	tempVertexArray[10].Normal = XMFLOAT4(0.0f, 1.0f, 0.0f, 1.0f);
	tempVertexArray[10].Tex = XMFLOAT2(1.0f, 0.0f);

	//v[11] = Vertex(+w2, +h2, -d2, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f);
	tempVertexArray[11].Pos = XMFLOAT4(+w2, +h2, -d2, 1.0f);
	tempVertexArray[11].Normal = XMFLOAT4(0.0f, 1.0f, 0.0f, 1.0f);
	tempVertexArray[11].Tex = XMFLOAT2(1.0f, 1.0f);

	// Fill in the bottom face vertex data.
	//v[12] = Vertex(-w2, -h2, -d2, 0.0f, -1.0f, 0.0f, -1.0f, 0.0f, 0.0f, 1.0f, 1.0f);
	tempVertexArray[12].Pos = XMFLOAT4(-w2, -h2, -d2, 1.0f);
	tempVertexArray[12].Normal = XMFLOAT4(0.0f, -1.0f, 0.0f, 1.0f);
	tempVertexArray[12].Tex = XMFLOAT2(1.0f, 1.0f);

	//v[13] = Vertex(+w2, -h2, -d2, 0.0f, -1.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[13].Pos = XMFLOAT4(+w2, -h2, -d2, 1.0f);
	tempVertexArray[13].Normal = XMFLOAT4(0.0f, -1.0f, 0.0f, 1.0f);
	tempVertexArray[13].Tex = XMFLOAT2(0.0f, 1.0f);

	//v[14] = Vertex(+w2, -h2, +d2, 0.0f, -1.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f);
	tempVertexArray[14].Pos = XMFLOAT4(+w2, -h2, +d2, 1.0f);
	tempVertexArray[14].Normal = XMFLOAT4(0.0f, -1.0f, 0.0f, 1.0f);
	tempVertexArray[14].Tex = XMFLOAT2(0.0f, 0.0f);

	//v[15] = Vertex(-w2, -h2, +d2, 0.0f, -1.0f, 0.0f, -1.0f, 0.0f, 0.0f, 1.0f, 0.0f);
	tempVertexArray[15].Pos = XMFLOAT4(-w2, -h2, +d2, 1.0f);
	tempVertexArray[15].Normal = XMFLOAT4(0.0f, -1.0f, 0.0f, 1.0f);
	tempVertexArray[15].Tex = XMFLOAT2(1.0f, 0.0f);

	// Fill in the left face vertex data.
	//v[16] = Vertex(-w2, -h2, +d2, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f);
	tempVertexArray[16].Pos = XMFLOAT4(-w2, -h2, +d2, 1.0f);
	tempVertexArray[16].Normal = XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[16].Tex = XMFLOAT2(0.0f, 1.0f);

	//v[17] = Vertex(-w2, +h2, +d2, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f);
	tempVertexArray[17].Pos = XMFLOAT4(-w2, +h2, +d2, 1.0f);
	tempVertexArray[17].Normal = XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[17].Tex = XMFLOAT2(0.0f, 0.0f);

	//v[18] = Vertex(-w2, +h2, -d2, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f);
	tempVertexArray[18].Pos = XMFLOAT4(-w2, +h2, -d2, 1.0f);
	tempVertexArray[18].Normal = XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[18].Tex = XMFLOAT2(1.0f, 0.0f);

	//v[19] = Vertex(-w2, -h2, -d2, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, 1.0f);
	tempVertexArray[19].Pos = XMFLOAT4(-w2, -h2, -d2, 1.0f);
	tempVertexArray[19].Normal = XMFLOAT4(-1.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[19].Tex = XMFLOAT2(1.0f, 1.0f);

	// Fill in the right face vertex data.
	//v[20] = Vertex(+w2, -h2, -d2, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f);
	tempVertexArray[20].Pos = XMFLOAT4(+w2, -h2, -d2, 1.0f);
	tempVertexArray[20].Normal = XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[20].Tex = XMFLOAT2(0.0f, 1.0f);

	//v[21] = Vertex(+w2, +h2, -d2, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f);
	tempVertexArray[21].Pos = XMFLOAT4(+w2, +h2, -d2, 1.0f);
	tempVertexArray[21].Normal = XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[21].Tex = XMFLOAT2(0.0f, 0.0f);

	//v[22] = Vertex(+w2, +h2, +d2, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f);
	tempVertexArray[22].Pos = XMFLOAT4(+w2, +h2, +d2, 1.0f);
	tempVertexArray[22].Normal = XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[22].Tex = XMFLOAT2(1.0f, 0.0f);

	//v[23] = Vertex(+w2, -h2, +d2, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
	tempVertexArray[23].Pos = XMFLOAT4(+w2, -h2, +d2, 1.0f);
	tempVertexArray[23].Normal = XMFLOAT4(1.0f, 0.0f, 0.0f, 1.0f);
	tempVertexArray[23].Tex = XMFLOAT2(1.0f, 1.0f);

	// Create a temporary "local" index array
	int totalNumberOfElements = 36 * 2;
	DWORD* tempIndexArray = new DWORD[ totalNumberOfElements * 3 ];
	memset( tempIndexArray, 0, totalNumberOfElements * 3 * sizeof(DWORD) );


	//UINT i[36];

	// Fill in the front face index data
	tempIndexArray[0] = 0; tempIndexArray[1] = 1; tempIndexArray[2] = 2;
	tempIndexArray[3] = 0; tempIndexArray[4] = 2; tempIndexArray[5] = 3;

	// FtempIndexArrayll tempIndexArrayn the back face tempIndexArrayndex data
	tempIndexArray[6] = 4; tempIndexArray[7]  = 5; tempIndexArray[8]  = 6;
	tempIndexArray[9] = 4; tempIndexArray[10] = 6; tempIndexArray[11] = 7;

	// FtempIndexArrayll tempIndexArrayn the top face tempIndexArrayndex data
	tempIndexArray[12] = 8; tempIndexArray[13] =  9; tempIndexArray[14] = 10;
	tempIndexArray[15] = 8; tempIndexArray[16] = 10; tempIndexArray[17] = 11;

	// FtempIndexArrayll tempIndexArrayn the bottom face tempIndexArrayndex data
	tempIndexArray[18] = 12; tempIndexArray[19] = 13; tempIndexArray[20] = 14;
	tempIndexArray[21] = 12; tempIndexArray[22] = 14; tempIndexArray[23] = 15;

	// FtempIndexArrayll tempIndexArrayn the left face tempIndexArrayndex data
	tempIndexArray[24] = 16; tempIndexArray[25] = 17; tempIndexArray[26] = 18;
	tempIndexArray[27] = 16; tempIndexArray[28] = 18; tempIndexArray[29] = 19;

	// FtempIndexArrayll tempIndexArrayn the rtempIndexArrayght face tempIndexArrayndex data
	tempIndexArray[30] = 20; tempIndexArray[31] = 21; tempIndexArray[32] = 22;
	tempIndexArray[33] = 20; tempIndexArray[34] = 22; tempIndexArray[35] = 23;

	g_mapPlyInfo[plyFileName].numberOfElementsToDraw = 36;


	D3D11_BUFFER_DESC bd;
	bd.Usage = D3D11_USAGE_DEFAULT;
	bd.ByteWidth = sizeof( SimpleVertex ) * totalNumberOfVertices;
	bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
	bd.CPUAccessFlags = 0;
	bd.MiscFlags = 0;
	D3D11_SUBRESOURCE_DATA InitData;
	InitData.pSysMem = tempVertexArray;

	HRESULT hr = g_pd3dDevice->CreateBuffer( &bd, &InitData, &(g_mapPlyInfo[plyFileName].vertexBuffer));
	if( FAILED( hr ) )
	{
		MessageBox( NULL, L"ERROR: Unable to create vertex buffer.", L"CreateBox - Something is wrong", MB_OK );
		return false;
	}

	// Same thing, but with the index buffer...
	bd.Usage = D3D11_USAGE_DEFAULT;
	bd.ByteWidth = sizeof( DWORD ) * totalNumberOfElements * 3;       
	bd.BindFlags = D3D11_BIND_INDEX_BUFFER;
	bd.CPUAccessFlags = 0;
	bd.MiscFlags = 0;
	InitData.pSysMem = tempIndexArray;
	hr = g_pd3dDevice->CreateBuffer( &bd, &InitData, &(g_mapPlyInfo[plyFileName].indexBuffer));
	if( FAILED( hr ) )
	{
		MessageBox( NULL, L"ERROR: Unable to create index buffer", L"CreateBox - Something is wrong", MB_OK );
		return false;
	}


	// Delete all of our stuff...
	delete [] tempVertexArray;		// WATCH IT!!
	delete [] tempIndexArray;

	return true;

	return true;
}
Beispiel #4
0
void GeneratePICsrc(FILE *flp, BOX *box, int nCmp)
{

	bool b2b = false;
	// The 1st thing we do: we find which boxes accept inputs from the outer world 
	// and do not accept them from other boxes on this page. They go to the 1st column, 
	// the leftmost one. 

	int done[MAXBOX];	
	int nDone = 0;
	
	memset(&done, '\x0', sizeof(done));
	

	// The 1st column includes only those boxes having JUST PAGE INPUTS, no inputs from other boxes
	for (int nBox = 0; nBox < nCmp; nBox++)	
	{
		b2b = false;
		for (int nInp = 0; nInp < MAXIO; nInp++) // Check all xrefs for each input
		{
			for (int nXref = 0; nXref < MAXREF; nXref++)		
			{
				if ( ((box + nBox)->inputs[nInp].from[nXref] > 0) && ((box + nBox)->inputs[nInp].from[nXref] != _PAGE_INPUT) )
				{
					// There's some box-to-box connection, we dont want this box on the 1st column
					b2b = true; 		
					break; // leave xref loop
				}
			}
			if (b2b)
				break; // leave input loop if box-to-box connection detected
		}

		if (!b2b) // Draw leftmost column now
		{
			box[nBox].nCol = 1; // Set column number to 1 in box structure

			if (!IAmOnTheList(done, box[nBox].n))  // Check if the box is in done list, and put it there if it's not
			{
				done[nDone] = box[nBox].n;
				nDone++;
			}
		}

	}

	////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Good. Here we have all the frontline boxes on the  'done' list
	// Let's go one by one and check which boxes go next. We'll track down chains of boxes for each box
	// on the list up to the end of the page 
	////////////////////////////////////////////////////////////////////////////////////////////////////////////
	
	int nLast = 1; // the 1st col is done. 
	bool Nothing2Do = false;
	int curBox;

	int  nPass = 0;

	while (!Nothing2Do)
	{

		// Loop through each box on page
		for (int nBox = 0; nBox < nCmp; nBox++)
		{

			//if (box[nBox].nCol != NO_COLUMN)	// Skip those boxes already having the col number
			//	continue;

			for (int nInp = 0; nInp < box[nBox].nInp; nInp++) // Loop through each input of the box
			{

				// Each input has array of x-references with box numbers it's coming from
				for (int nSrc = 0; nSrc < MAXREF; nSrc++)
				{
					if ((box[nBox].inputs[nInp].from[nSrc] == _NUM_INPUT) || 
						(box[nBox].inputs[nInp].from[nSrc] == 0) ) // input can be a number - ignore if this is the case
						continue;

					curBox = box[nBox].inputs[nInp].from[nSrc]; // Get the number that is n member for input's source box

					int nColInp = GetBoxColumn(box, curBox, nCmp);

					if ((nColInp >= box[nBox].nCol) && (nColInp != NO_BOX_FOUND))
					{
						 box[nBox].nCol = nColInp + 1;

						if (nLast <  box[nBox].nCol)
							nLast =  box[nBox].nCol;

					}
				}
			}

		}

		// Do configured number of iterations to complete placing of boxes
		if (nPass < conf.nIterations)
		{
			Nothing2Do = false; 
			nPass++;
		}
		else
			Nothing2Do = true;

	}

	fprintf(stderr, "nLast = %d\n", nLast);
	for (int nBox = 0; nBox < nCmp; nBox++)	
	{
		fprintf(stderr, "Box %d nCol = %d\n", box[nBox].n, box[nBox].nCol);
	}
	
	int nTopBox;
	int  nBoxThisCol = 0;
	char boxName[MAXNAME];
	char boxData[MAXNAME];

	for (int nCol = 1; nCol <= nLast; nCol++)
	{
		nBoxThisCol = 0;

		for (int nBox = 0; nBox < nCmp; nBox++)
		{
			if (box[nBox].nCol == nCol)
			{

				if (nBoxThisCol == 0)
				{
					if (nCol > 1)	
					{
                        			fprintf(flp, "move to Box%d\n", nTopBox);
                        			fprintf(flp, "line invis right %g from Box%d.e\n", conf.horD, nTopBox);
					}
					nTopBox = box[nBox].n;
				}

				memset(boxName, '\x0', sizeof(boxName));
				GetBoxName(box[nBox].type, boxName);

				memset(boxData, '\x0', sizeof(boxData));
				GetBoxData(&box[nBox], boxData);

                        	fprintf(flp, "Box%d:\n", box[nBox].n);
                        	fprintf(flp, "box \"\\s-%d%d\\s+%d\" \"\\s-%d%s\\s+%d\" \"\\s-%d%s\\s+%d\" width %g height %g\n",  
						      	conf.fontFactorBox, 
							box[nBox].n, 
							conf.fontFactorBox,
							conf.fontFactorBox,
							boxName, 
							conf.fontFactorBox,
							conf.fontFactorBox,
							boxData,
							conf.fontFactorBox,
							conf.boxW,
							conf.boxH);

                        	fprintf(flp, "line invis down %g from last box.s\n", conf.vertD);

				nBoxThisCol++;

			}
		}
	}


	// Now draw connections
	// We'll start at inputs and connect them to corresponding outputs
	
	
	float maxVertCoord[16]; 	
	memset(maxVertCoord, '\x0', sizeof(maxVertCoord));
	int nColor = 0;
	
	for (int nBox = 0; nBox < nCmp; nBox++)	
	{
		box[nBox].inpCnt = 1;
		for (int nInp = 0; nInp < box[nBox].nInp; nInp++)
		{
			 for (int nSrc = 0; nSrc < MAXREF; nSrc++)
			 {
				if ((box[nBox].inputs[nInp].from[nSrc] != _NUM_INPUT) && 
				    (box[nBox].inputs[nInp].from[nSrc] != _PAGE_INPUT) && 
				    (box[nBox].inputs[nInp].from[nSrc] > 0))
				{

					/*
					+------------+  box[nBox].inputs[nInp].from[nSrc]
					|            |
					|            |
					|            |
					|            |
					|            |--+
					|            |  |
					|            |  |
					|            |  |
					|            |  |
					+------------+  |               
					             |  | maxVertCoord[box[nBox].nCol]
				               ----->|--|<------
			                             |  |			box[nBox].n	
				                        |                       +------------+	
					                |        		|            |			
					                |        		|            |	
					                |        		|            |	
					                |        		|            |	
					                +-----------------------|            |	
					                        		|            |	
					                        		|            |	
					                        		|            |	
					                        		|            |	
				 						+------------+	
				
					
					*/

					// from 1/3 of the way between BOX3.ne and BOX3.se

					int nSrcBox =  GetBoxByID(box, box[nBox].inputs[nInp].from[nSrc], nCmp);

					maxVertCoord[box[nBox].nCol]+=conf.tracingHorD;

	//fprintf(flp, "line coloured \"%s\" right %f from %d/%d of the way between Box%d.ne and Box%d.se then to (Box%d.e.x + %f, Box%d.nw.y - %g*%d) then to Box%d.nw - (0, %g*%d)\n", 
	fprintf(flp, "line coloured \"%s\" right %f from %d/10 of the way between Box%d.ne and Box%d.se then to (Box%d.e.x + %f, Box%d.nw.y - %g*%d) then to Box%d.nw - (0, %g*%d)\n", 
						 curColor[nColor],
						 maxVertCoord[box[nBox].nCol], 		 
						 box[nSrcBox].outCnt + 1, 
						// box[nSrcBox].nOut + 1, 
						 box[nBox].inputs[nInp].from[nSrc], 
						 box[nBox].inputs[nInp].from[nSrc], 
						 box[nBox].inputs[nInp].from[nSrc], 
						 maxVertCoord[box[nBox].nCol], 
						 box[nBox].n,
						 conf.tracingVertD,
						 box[nBox].inpCnt, 
						 box[nBox].n,
						 conf.tracingVertD,
						 box[nBox].inpCnt);

			fprintf(flp, "line invis left %g from Box%d.nw - (0, %g*%d) \"\\s-%d%s\\s+%d\" \"\"\n",  
						conf.labelLineL, 
						box[nBox].n, 
						conf.tracingVertD,
						box[nBox].inpCnt, 
						conf.fontFactorLabel,
						box[nBox].inputs[nInp].name,
						conf.fontFactorLabel);

					box[nSrcBox].outCnt++;
					box[nBox].inpCnt++;

				}
				else if (box[nBox].inputs[nInp].from[nSrc] == _PAGE_INPUT) 
				{
					//fprintf(flp, "line left 12 at %d/%d <Box%d.nw, Box%d.sw> \"%s\" \"\"\n", nInp, box[nBox].nInp, box[nBox].n, 
														//box[nBox].n, box[nBox].inputs[nInp].name);

				}

			}
		}


		nColor++;
		if (nColor == NCOLOR)
			nColor = 0;

	}

	for (int nBox = 0; nBox < nCmp; nBox++)
	{
		box[nBox].outCnt = 0;
		box[nBox].inpCnt = 0;
	}

	for (int nBox = 0; nBox < nCmp; nBox++)
	{
                for (int nOut = 0; nOut < box[nBox].nOut; nOut++)
                {
                         for (int nDst = 0; nDst < MAXREF; nDst++)
                         {
				if (box[nBox].outputs[nOut].to[nDst] == _PAGE_OUTPUT)
					fprintf(flp, "line dashed %g right %g from %d/%d <Box%d.ne, Box%d.se> \"\\s-%d%s\\s+%d\" \"\"\n", 
							conf.dashD,
							conf.outputLineL,
							nOut + 1, 
							box[nBox].nOut + 1, 
							box[nBox].n,
							box[nBox].n, 
							conf.fontFactorLabel,
							box[nBox].outputs[nOut].name,
							conf.fontFactorLabel);
			 }
		}	
	}

        for (int nBox = 0; nBox < nCmp; nBox++)
        {
                for (int nInp = 0; nInp < box[nBox].nInp; nInp++)
                {
                         for (int nSrc = 0; nSrc < MAXREF; nSrc++)
                         {
                                if (box[nBox].inputs[nInp].from[nSrc] == _PAGE_INPUT)
                                        fprintf(flp, "line dashed %g left %g from %d/%d <Box%d.nw, Box%d.sw> \"\\s-%d%s\\s+%d\" \"\"\n", 
							conf.dashD,
							conf.inputLineL,
							nInp + 1, 
							box[nBox].nInp + 1, 
							box[nBox].n,
							box[nBox].n, 
							conf.fontFactorLabel,
							box[nBox].inputs[nInp].name,
							conf.fontFactorLabel);
                         }
                }
        }
	 	

}