LOCAL void hel_opt () { WX("\n"); WX("FunnelWeb Command Line Options\n"); WX("------------------------------\n"); WX("Options are of the form (\"+\" | \"=\" | \"-\") <letter> [<string>].\n"); WX("+ turns on an option. - turns it off. = doesn't affect it's onoffedness.\n"); WX("The case (e.g. upper or lower) of <letter> does not matter.\n"); WX("<string> is usually a filename or directory, but sometimes a number.\n"); WX("Convention: f=filename, n=decimal number, h=help message name.\n"); WX("\n"); WX("Example: fw sloth +L +Jaardvark.xxx +W80 -Q =Twalrus.tex\n"); WX("\n"); WX("Action options: (choose at least one when you invoke FunnelWeb from the OS).\n"); WX("If you choose more than one, they will be executed in the order given here.\n"); WX(" +Xf Execute specified Funnelweb script.\n"); WX(" +Ff Process specified input file.\n"); WX(" +Hh Display specified help message.\n"); WX(" +K Invoke FunnelWeb's interative mode.\n"); WX("\n"); WX("Other options:\n"); WX(" +B1 Diagnostic: Dump image of input file to listing file.\n"); WX(" +B2 Diagnostic: Dump scanner's line list to listing file.\n"); WX(" +B3 Diagnostic: Dump scanner's token list to listing file.\n"); WX(" +B4 Diagnostic: Dump parser's macro table to listing file.\n"); WX(" +B5 Diagnostic: Dump parser's document list to listing file.\n"); WX(" +B6 Diagnostic: Dump time breakdown report to listing file.\n"); WX(" +B7 Diagnostic: Suppress non-deterministic output.\n"); WX(" +Cn Number of lines of context around diagnostics in listing file.\n"); WX(" +D Delete each output file identical to its previous version.\n"); WX(" +If Default file specification for include files.\n"); WX(" +Jf Generate journal file. Default file specification.\n"); WX(" +Lf Generate listing file. Default file specification.\n"); WX(" +Of Generate product files. Default file specification.\n"); WX(" +Q Quiet mode. Only really important messages displayed on console.\n"); WX(" +Tf Generate typesetter file. Default file specification.\n"); WX(" +U Output listing messages in UNIX compiler format.\n"); WX(" +Sn Send errors to console with specified number of lines of context.\n"); WX(" +Wn Set maximum length of lines in product files.\n"); WX("\n"); WX("If an option appears more than once, the rightmost one dominates.\n"); WX("For more detailed information, refer to the FunnelWeb User's Manual.\n"); WX("For default values refer to the \"DEFOPTIONS\" help message.\n"); }
LOCAL void hel_com () { WX("\n"); WX("FunnelWeb Interactive Commands\n"); WX("------------------------------\n"); WX(" ! - Comment. Ignores the whole line. \n"); WX(" ABSENT fn - Aborts if specified file exists. \n"); WX(" CODIFY ftext fC - Convert text file into C code to write text. \n"); WX(" COMPARE f1 f2 - Aborts if two files are different. \n"); WX(" DEFINE n \"text\" - Defines $n to translate to text. \n"); WX(" DIFF f1 f2 logf [ABORT] - Writes differences between f1 and f2 to logf.\n"); WX(" - Severe if different and ABORT is present. \n"); WX(" DIFFSUMMARY - Summary of differences done since DIFFZERO. \n"); WX(" DIFFZERO - Zeros differences counters. \n"); WX(" ENEO fn - Establish Non Existence Of file. \n"); WX(" EXECUTE fn - Execute commands in specified file. \n"); WX(" EXISTS fn - Aborts if file does not exist. \n"); WX(" FIXEOLS fn [outf] - Fixes up EOL markers in specified file. \n"); WX(" FW options - Invoke FunnelWeb-proper once. \n"); WX(" HELP [name] - Displays specified help message. \n"); WX(" HERE - Terminates effect of SKIPTO command. \n"); WX(" QUIT - Quits FunnelWeb. \n"); WX(" SET options - Sets options. \n"); WX(" SHOW - Displays currently active options. \n"); WX(" SKIPTO - Ignore commands until HERE command. \n"); WX(" STATUS - Write out status and diagnostic counts. \n"); WX(" STATUS [Sn] [En] [Wn] - Aborts if status is not as specified. \n"); WX(" TOLERATE - Don't abort script if next commmand gens err.\n"); WX(" TRACE ON | OFF - Turns command tracing ON or OFF. \n"); WX(" WRITE \"text\" - Writes specified text to screen and journal. \n"); WX(" WRITEU \"text\" - Same as WRITE but underlines text. \n"); WX("\n"); WX("More detailed information can be found in the FunnelWeb User's Manual.\n"); WX("\n"); WX("Most of these commands were created to support regression testing and\n"); WX("can be ignored by most users. In fact most users will never need to invoke\n"); WX("FunnelWeb's interactive mode at all. If you are just getting started\n"); WX("with FunnelWeb, it's probably best to run FunnelWeb directly from your\n"); WX("command interface and ignore the +K command line option for now.\n"); }
LOCAL void hel_int () { WX("\n"); WX("FunnelWeb Introduction\n"); WX("----------------------\n"); WX("Welcome to FunnelWeb, a literate-programming macro preprocessor.\n"); WX("\n"); WX("Traditional computer programs are primarily written for computers and consist\n"); WX("of code laced with comments. In contrast, literate programs are primarily\n"); WX("written for humans and consist of comments laced with code. While simple, the\n"); WX("effect of this inversion can be so profound as to change one's whole approach\n"); WX("to programming. The literate programmer focuses on conveying meaning to other\n"); WX("intelligent beings rather than merely convincing the computer to behave in a\n"); WX("particular way. It is the difference between performing and exposing a magic\n"); WX("trick.\n"); WX("\n"); WX("FunnelWeb is a production-quality literate-programming tool that emphasises\n"); WX("simplicity and reliability. It provides a macro facility, and assists in the\n"); WX("production of typeset documentation. FunnelWeb runs on most popular machines\n"); WX("(Sun, VAX, Mac, PC) and its highly portable source code in C is freely\n"); WX("available under a GNU license.\n"); WX("\n"); WX("To get started with FunnelWeb, obtain a printed copy of the \"FunnelWeb User's\n"); WX("Manual\" (see the \"DOCUMENTATION\" help message). Read the introduction and work\n"); WX("through the tutorial. The manual contains an overview of FunnelWeb, an\n"); WX("introductory tutorial, and a comprehensive reference manual. Try it!\n"); }
{'m', 0, switch_to_map}, {'k', 0, main_init_kiss}, {0, KEY_DN, main_move_cursor}, {0, KEY_UP, main_move_cursor}, {0, KEY_PGDN, main_move_cursor}, {0, KEY_PGUP, main_move_cursor}, {0x00, 0, NULL} }; struct key_map config_screen[] = { {0x1B, 0, switch_to_main}, {0x00, 0, NULL} }; struct element_layout aprs_info_elements[] = { {"AI_ICON", WX(540), WY(0)}, {"AI_CALLSIGN", WX(0), WY(10)}, {"AI_COURSE", WX(0), WY(50), 560}, {"AI_COMMENT", WX(0), WY(80), 560}, {"AI_DISTANCE", WX(220), WY(15)}, {NULL, 0, 0} }; struct element_layout aprs_list_elements[] = { {"AL_00", WX(0), 120}, {"AL_01", WX(0), 150}, {"AL_02", WX(0), 180}, {"AL_03", WX(0), 210}, {"AL_04", WX(320), WY(120)}, {"AL_05", WX(320), WY(150)},
/* * _nd_drawObjCommon() draws the common parts of string, menu, list, and text * objects. It returns a bitmap of what it drew: * * rc & DREW_TITLE -- drew a title * rc & DREW_PREFIX -- drew a prefix * rc & DREW_SUFFIX -- drew a suffix * rc & DREW_A_BOX -- drew a little box around where the data * is supposed to go. * */ int _nd_drawObjCommon(void *o, void* w) { Obj *obj = OBJ(o); int preflen; /* length of any prefix */ int sufflen; /* length of any suffix */ int status = 0; int boxcolor, objcolor; WINDOW *win = Window(w); int x = WX(w), y = WY(w); if (obj == 0) return 0; ADJUSTXY(obj, x, y); /* If we're part of a widget, we either return DREW_A_BOX if we've * got an (ignored) prefix or suffix or 0. */ if (obj->parent != 0 && (obj->flags & OBJ_DRAW) == 0) return (obj->prefix || obj->suffix) ? DREW_A_BOX : 0; /* otherwise we draw like mad */ boxcolor = IS_CURRENT(o) ? ACTIVE_COLOR : WINDOW_COLOR; objcolor = WINDOW_COLOR | (OBJ_READONLY(o) ? READONLY_COLOR : 0); preflen = obj->prefix ? strlen(obj->prefix) : 0; sufflen = obj->suffix ? strlen(obj->suffix) : 0; setcolor(win, objcolor); /* print any title */ if (obj->title) { /* If we have a prefix or suffix, the data will be boxed, so * don't forget to adjust the title position to account for * the box frame. */ if (obj->prefix || obj->suffix) wmove(win, y, x+preflen+1); else wmove(win, y, x); waddstr(win, obj->title); status |= DREW_TITLE; y++; } /* print a box around the data field, if needed */ if (obj->prefix || obj->suffix || objType(obj) == O_TEXT) { drawbox(win, y, x+preflen, obj->depth+2, obj->width+2, 0, boxcolor, boxcolor); status |= DREW_A_BOX; y++; } setcolor(win, objcolor); /* print any prefix */ if (obj->prefix) { wmove(win, y, x); status |= DREW_PREFIX; waddstr(win, obj->prefix); } /* print any suffix */ if (obj->suffix) { wmove(win, y, x+preflen+2+obj->width); waddstr(win, obj->suffix); status |= DREW_SUFFIX; } return status; } /* _nd_drawObjCommon */
void CImage::WriteHeader(ScsiWindow *pscsiwindow, int size, char *szMeta) { TiffBitonal tiffbitonal; TiffGray tiffgray; TiffColor tiffcolor; if (pod.m_pfile) { fseek(pod.m_pfile,0,SEEK_SET); switch (pscsiwindow->ImageComposition) { default: case 1: memcpy(&tiffbitonal,&s_tiffbitonal,sizeof(tiffbitonal)); tiffbitonal.tifftag[2].u32Value = UX(pscsiwindow->Width) / (1200 / WX(pscsiwindow->X_resolution)); tiffbitonal.tifftag[3].u32Value = size / ((tiffbitonal.tifftag[2].u32Value + 7) / 8); tiffbitonal.tifftag[5].u32Value = 1; tiffbitonal.tifftag[6].u32Value = 1; tiffbitonal.tifftag[10].u32Value = size / ((tiffbitonal.tifftag[2].u32Value + 7) / 8); tiffbitonal.tifftag[11].u32Value = size; tiffbitonal.tifftag[14].u32Value = 292; tiffbitonal.tifftag[14].u32Value = 0; tiffbitonal.u32XResolution[0] = WX(pscsiwindow->X_resolution); tiffbitonal.u32YResolution[0] = WX(pscsiwindow->Y_resolution); fwrite(&tiffbitonal,1,sizeof(tiffbitonal),pod.m_pfile); if (szMeta) { sprintf ( szMeta, "<sword>\n" "\t<pixel>bw</pixel>\n" "\t<resolution>%d</resolution>\n" "\t<size>%d</size>\n" "\t<width>%d</width>\n" "\t<height>%d</height>\n" "\t<bytesperrow>%d</bytesperrow>\n" "</sword>\n", WX(pscsiwindow->X_resolution), sizeof(tiffbitonal) + size, UX(tiffbitonal.tifftag[2].u32Value), UX(tiffbitonal.tifftag[3].u32Value), tiffbitonal.tifftag[10].u32Value ); } break; case 2: memcpy(&tiffgray,&s_tiffgray,sizeof(tiffgray)); tiffgray.tifftag[2].u32Value = UX(pscsiwindow->Width) / (1200 / WX(pscsiwindow->X_resolution)); tiffgray.tifftag[3].u32Value = size / tiffgray.tifftag[2].u32Value; tiffgray.tifftag[5].u32Value = 1; tiffgray.tifftag[9].u32Value = size / tiffgray.tifftag[2].u32Value; tiffgray.tifftag[10].u32Value = size; tiffgray.u32XResolution[0] = WX(pscsiwindow->X_resolution); tiffgray.u32YResolution[0] = WX(pscsiwindow->Y_resolution); fwrite(&tiffgray,1,sizeof(tiffgray),pod.m_pfile); if (szMeta) { sprintf ( szMeta, "<sword>\n" "\t<pixel>gray</pixel>\n" "\t<resolution>%d</resolution>\n" "\t<size>%d</size>\n" "\t<width>%d</width>\n" "\t<height>%d</height>\n" "\t<bytesperrow>%d</bytesperrow>\n" "</sword>\n", WX(pscsiwindow->X_resolution), sizeof(tiffgray) + size, tiffgray.tifftag[2].u32Value, tiffgray.tifftag[3].u32Value, tiffgray.tifftag[9].u32Value ); } break; case 5: memcpy(&tiffcolor,&s_tiffcolor,sizeof(tiffcolor)); tiffcolor.tifftag[2].u32Value = UX(pscsiwindow->Width) / (1200 / WX(pscsiwindow->X_resolution)); tiffcolor.tifftag[3].u32Value = size / (tiffcolor.tifftag[2].u32Value * 3); tiffcolor.tifftag[5].u32Value = 1; tiffcolor.tifftag[9].u32Value = size / (tiffcolor.tifftag[2].u32Value * 3); tiffcolor.tifftag[10].u32Value = size; tiffcolor.u32XResolution[0] = WX(pscsiwindow->X_resolution); tiffcolor.u32YResolution[0] = WX(pscsiwindow->Y_resolution); fwrite(&tiffcolor,1,sizeof(tiffcolor),pod.m_pfile); if (szMeta) { sprintf ( szMeta, "<sword>\n" "\t<pixel>color</pixel>\n" "\t<resolution>%d</resolution>\n" "\t<size>%d</size>\n" "\t<width>%d</width>\n" "\t<height>%d</height>\n" "\t<bytesperrow>%d</bytesperrow>\n" "</sword>\n", WX(pscsiwindow->X_resolution), sizeof(tiffcolor) + size, UX(tiffcolor.tifftag[2].u32Value), UX(tiffcolor.tifftag[3].u32Value), tiffcolor.tifftag[9].u32Value ); } break; } } }
data, extra); } static int iw_get_encodeext(struct net_device *netdev, struct iw_request_info *info, union iwreq_data *data, char *extra) { return ieee80211_wx_get_encodeext(zd_netdev_ieee80211(netdev), info, data, extra); } #define WX(x) [(x)-SIOCIWFIRST] static const iw_handler zd_standard_iw_handlers[] = { WX(SIOCGIWNAME) = iw_get_name, WX(SIOCSIWFREQ) = iw_set_freq, WX(SIOCGIWFREQ) = iw_get_freq, WX(SIOCSIWMODE) = iw_set_mode, WX(SIOCGIWMODE) = iw_get_mode, WX(SIOCGIWRANGE) = iw_get_range, WX(SIOCSIWENCODE) = iw_set_encode, WX(SIOCGIWENCODE) = iw_get_encode, WX(SIOCSIWENCODEEXT) = iw_set_encodeext, WX(SIOCGIWENCODEEXT) = iw_get_encodeext, WX(SIOCSIWAUTH) = ieee80211_wx_set_auth, WX(SIOCGIWAUTH) = ieee80211_wx_get_auth, WX(SIOCSIWSCAN) = ieee80211softmac_wx_trigger_scan, WX(SIOCGIWSCAN) = ieee80211softmac_wx_get_scan_results, WX(SIOCSIWESSID) = ieee80211softmac_wx_set_essid, WX(SIOCGIWESSID) = ieee80211softmac_wx_get_essid,