Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.astro.louisville.edu/software/sbig/archive/xmccd-4.1/xmccd-4.1e/xpa-2.1.14/doc/convert.html
Дата изменения: Thu Dec 25 05:29:54 2003 Дата индексирования: Thu Feb 27 22:40:28 2014 Кодировка: Поисковые слова: rings |
This document describes tips for converting from xpa 1.0 (Xt-based xpa) to xpa 2.0 (socket-based xpa).
The following are tips for converting from xpa 1.0 (Xt-based xpa) to xpa 2.0 (socket-based xpa). The changes are straight-forward and almost can be done automatically (we used editor macros for most of the conversion).
#ifdef XPA_VERSION static void XPAReceiveFile(client_data, call_data, paramlist, buf, len) void *client_data; void *call_data; char *paramlist; char *buf; int len; #else static void XPAReceiveFile(w, client_data, call_data, paramlist, buf, len) Widget w; XtPointer client_data; XtPointer call_data; char *paramlist; char *buf; int len; #endif
xpa = NewXPACommand(toplevel, NULL, prefix, NULL);is changed to:
xpa = XPACmdNew(xclass, name);
AddXPACommand(xpa, "file", "\tdisplay a new file\n\t\t requires: filename", NULL, NULL, NULL, XPAReceiveFile, text, NULL);is changed to:
XPACmdAdd(xpa, "file", "\tdisplay a new file\n\t\t requires: filename", NULL, NULL, NULL, XPAReceiveFile, text, NULL);
/* add the xpas to the Xt loop */ XPAXtAddInput(app, NULL); /* process events */ XtAppMainLoop(app);
xpa = NewXPA(saotng->xim->toplevel, prefix, xparoot, "FITS data or image filename\n\t\t options: file type", XPASendData, new, NULL, XPAReceiveData, new, "SE");is changed to:
sprintf(tbuf, "%s.%s", prefix, xparoot); xpa = XPANew("SAOTNG", tbuf, "FITS data or image filename\n\t\t options: file type", XPASendData, new, NULL, XPAReceiveData, new, "SE"); XPAXtAddInput(XtWidgetToApplicationContext(saotng->xim->toplevel), xpa);
XPAInternalReceiveCommand(im->saotng->xim->toplevel, im->saotng, im->saotng->commands, "zoom reset", NULL, 0);is changed to:
XPACmdInternalReceive(im->saotng, im->saotng->commands, "zoom reset", NULL, 0);
DestroyXPA(im->dataxpa);is changed to:
XPAFree(im->dataxpa);