Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 4b118028600939068a9eabcfca167d43 > files > 78

Xdialog-2.3.1-11.mga7.x86_64.rpm

#include <stdlib.h>
#include <unistd.h>
#include <string.h>

int main (int argc, char **argv)
{
	char wrapped_cmd[1024];

	if (getenv("DISPLAY")) {
		setenv("XDIALOG_HIGH_DIALOG_COMPAT", "true", 0);
		setenv("XDIALOG_FORCE_AUTOSIZE", "true", 0);
		execvp("Xdialog", argv);
	} else {
		strcpy(wrapped_cmd, argv[0]);
		strcat(wrapped_cmd, ".wrapped");
		execvp(wrapped_cmd, argv);
	}
	return 0;
}