Esempio n. 1
0
int main(int x, int y)
{
	int a;
	int b;
	
	a=2+1;
	
	if(a==2) {
		a = a + 1;
		b = 3;
	}
	else
		b = 5;
	
	while (a<5)
	{
		a = a+5 * 3;
	}
	
	b = xtop(a+2*3,a);
	
	print (a);
	
	scan (a);
}
Esempio n. 2
0
void PrintableWindow::hide() {
	if (bound()) {
		if (is_mapped()) {
			xplace(xleft(), xtop());
//printf("hide %lx %d %d\n", (long)this, xleft_, xtop_);
			WindowRep& w = *((Window*)this)->rep();
			XWithdrawWindow(display()->rep()->display_, w.xwindow_, display()->rep()->screen_);
		}
	}
}
Esempio n. 3
0
int main(int argc, char *args[])
{
	int cn = 0, srank = 0;

	query = getenv("QUERY_STRING");
	if (query && !strncmp(query, "cn=", 3))
	{
		cn = atoi(query + 3);
	}
	if (query && !strncmp(query, "rank=", 5))
	{
		srank = atoi(query + 5);
	}

	chdir("/home/merc");

	printf("Content-Type: text/html\n\n");
	printf("<html><head><title>Server Info</title></head>\n");
	printf("<BODY TEXT=#D7D700 BGCOLOR=#264A9F LINK=#FFFFBB VLINK=#CCCC00 ALINK=#FFFF9D background=/gfx/back4.gif>");
	printf("<center>");
	printf("<table width=\"100%%\"><tr>");
	printf(
		"    <table width=\"100%%\">"
		"        <tr>"
		"            <td align=\"center\"><a href=\"http://www.astonia.com/\"><img src=\"/gfx/logo.gif\" width=\"100\" height=\"60\" border=\"0\"></a></td>"
		"            <td align=\"center\">"
		"                <a href=\"/\">Home</a>"
		"                <a href=\"/manual.html\">Manual</a>"
		"                <a href=\"/terms.html\">Terms</a>"
		"                <a href=\"/download.html\">Download</a>"
		"                <a href=\"/contact.html\">Contact</a>"
		"                <a href=\"/cgi-bin/info.cgi\">Server&nbsp;Status</a>"
		"                <a href=\"/cgi-bin/who.cgi\">Who's&nbsp;Online</a>"
		"                <a href=\"/bugs.html\">Bugs</a>"
		"                <a href=\"/changes.html\">Changes</a>"
		"                <a href=\"/creators.html\">Creators</a>"
		"                <a href=\"/links.html\">Links</a>"
		"                <a href=\"/privacy.html\">Privacy</a>"
		"            </td>"
		"            <td align=\"center\"><a href=\"http://www.astonia.com/\"><img src=\"/gfx/logo.gif\" width=\"100\" height=\"60\" border=\"0\"></a></td>"
		"        </tr>"
		"    </table>");
	printf("</td></tr></table>");
	printf("<img src=/gfx/barsmall.gif border=0 align=left alt=---- width=100%% height=5><br>");
	printf("<table width=60%%><tr><td>\n");

	if (load())
	{
		printf("<b>Cannot access server data. Exiting... (%s)</b></td></tr></table>", strerror(errno));
		exit(0);
	}

	if (args[0])
	{
		if (strcmp(args[0], "who.cgi")==0)
		{
			who();
		}
		else if (strcmp(args[0], "top.cgi")==0)
		{
			top();
		}
		else if (strcmp(args[0], "info.cgi")==0)
		{
			info(cn);
		}
		else if (strcmp(args[0], "hog.cgi")==0)
		{
			hog();
		}
		else if (strcmp(args[0], "gods.cgi")==0)
		{
			gods();
		}
		else if (strcmp(args[0], "staff.cgi")==0)
		{
			staff();
		}
		else if (strcmp(args[0], "effects.cgi")==0)
		{
			effects();
		}
		else if (strcmp(args[0], "xtop.cgi")==0)
		{
			xtop(srank);
		}
		else if (strcmp(args[0], "dtop.cgi")==0)
		{
			dtop(srank);
		}
		else
		{
			printf("Internal error... (%s)\n", args[0]);
		}
	}
	else
	{
		printf("Internal error...");
	}

	unload();

	printf("</td></tr></table><br>");

	printf(
		"<img src=\"/gfx/barsmall.gif\" border=0 align=\"left\" alt=\"----\" width=\"100%%\" height=5><br>"
		"<table width=\"100%%\" cellpadding=0 cellspacing=0 border=0><tr>"
		"<td width=\"33%%\" align=center><a href=/devel.html>Back to main page</a></td>"
		"<td width=\"33%%\" align=center>&nbsp;</td>"
		"<td width=\"33%%\" align=center><font size=-1>All material on this server is copyright "
		"<a href=mailto:[email protected]>D.Brockhaus</a></font></td>"
		"</tr></table>"
		"</center><br><br>"
		"</body></html>");

	return(0);
}