예제 #1
0
static void write_host_info(void) {
	txt_buf->append("---------- short summary ----------\n");

	/* make first X version */
	char buf[256];
	snprintf(buf, sizeof(buf), "\nX version: %s %i %i.%i", XServerVendor(fl_display), XVendorRelease(fl_display), XProtocolVersion(fl_display), XProtocolRevision(fl_display));
	txt_buf->append(buf);

	txt_buf->append("\nFLTK version: " FLTK_VERSION);
	txt_buf->append("\nEDE version: " PACKAGE_VERSION);
	txt_buf->append("\nedelib version: " EDELIB_VERSION);

	struct utsname ut;
	if(uname(&ut) == 0) {
		snprintf(buf, sizeof(buf), "%s %s %s %s %s", ut.sysname, ut.nodename, ut.release, ut.version, ut.machine);
		txt_buf->append("\nSystem info: ");
		txt_buf->append(buf);
	}

	txt_buf->append("\nProgram name: ");
	if(pdetails->name)
		txt_buf->append(pdetails->name);
	else
		txt_buf->append("(unknown)");

	txt_buf->append("\nProgram path: ");
	if(pdetails->path)
		txt_buf->append(pdetails->path);
	else
		txt_buf->append("(unknown)");

	txt_buf->append("\nProgram PID: ");
	if(pdetails->pid)
		txt_buf->append(pdetails->pid);
	else
		txt_buf->append("(unknown)");

	txt_buf->append("\nSignal received: ");
	if(pdetails->sig)
		txt_buf->append(pdetails->sig);
	else
		txt_buf->append("(unknown)");

	txt_buf->append("\n\n---------- backtrace ----------\n\n");
}
예제 #2
0
파일: xdk-display.c 프로젝트: derekdai/xdk
gint xdk_display_get_release(XdkDisplay * self)
{
	g_return_val_if_fail(self, 0);
	
	return XVendorRelease(self->priv->peer);
}