/* c_intr_divide ------------------------------------------------------------*/ void c_intr_divide() { #if 0 /* test code for exception handling */ char apic; extern void user_ex(); unsigned long k; printk("divided by 0\n"); baka --; if (*apic_id) apic = 1; else apic = 0; if (cpu_num == 0) apic = 0; sys_iras_tex(apic, c_tskid[apic], 0x0001); check_tex(apic); #endif }
static void write_texman(FILE *out,const char *program, int nldesc,const char **desc, int nfile,t_filenm *fnm, int npargs,t_pargs *pa, int nbug,const char **bugs, t_linkdata *links) { int i; char tmp[256]; fprintf(out,"\\section{\\normindex{%s}}\\label{%s}\n\n",check_tex(program),check_tex(program)); if (nldesc > 0) for(i=0; (i<nldesc); i++) fprintf(out,"%s\n",check_tex(desc[i])); if (nfile > 0) { fprintf(out,"\\vspace{-2ex}\\begin{tabbing}\n"); fprintf(out,"\n{\\normalsize \\bf Files}\\nopagebreak\\\\\n"); fprintf(out,"{\\tt ~~~~~~~} \\= {\\tt ~~~~~~~~~~~~~~} \\= " "~~~~~~~~~~~~~~~~~~~~~~ \\= \\nopagebreak\\kill\n"); for(i=0; (i<nfile); i++) fprintf(out,"\\>{\\tt %s} \\'\\> {\\tt %s} \\' %s \\> " "\\parbox[t]{0.55\\linewidth}{%s} \\\\\n", check_tex(fnm[i].opt),check_tex(fnm[i].fns[0]), check_tex(fileopt(fnm[i].flag,tmp,255)), check_tex(ftp2desc(fnm[i].ftp))); fprintf(out,"\\end{tabbing}\\vspace{-4ex}\n"); } if (npargs > 0) { fprintf(out,"\\vspace{-2ex}\\begin{tabbing}\n"); fprintf(out,"\n{\\normalsize \\bf Other options}\\nopagebreak\\\\\n"); fprintf(out,"{\\tt ~~~~~~~~~~} \\= vector \\= " "{\\tt ~~~~~~~} \\= \\nopagebreak\\kill\n"); for(i=0; (i<npargs); i++) { if (strlen(check_tex(pa_val(&(pa[i]),tmp,255))) <= 8) fprintf(out,"\\> {\\tt %s} \\'\\> %s \\'\\> {\\tt %s} \\' " "\\parbox[t]{0.68\\linewidth}{%s}\\\\\n", check_tex(pa[i].option),argtp[pa[i].type], check_tex(pa_val(&(pa[i]),tmp,255)), check_tex(pa[i].desc)); else fprintf(out,"\\> {\\tt %s} \\'\\> %s \\'\\>\\\\\n" "\\> \\'\\> \\'\\> {\\tt %s} \\' " "\\parbox[t]{0.7\\linewidth}{%s}\\\\\n", check_tex(pa[i].option),argtp[pa[i].type], check_tex(pa_val(&(pa[i]),tmp,255)), check_tex(pa[i].desc)); } fprintf(out,"\\end{tabbing}\\vspace{-4ex}\n"); } if (nbug > 0) { fprintf(out,"\n"); fprintf(out,"\\begin{itemize}\n"); for(i=0; (i<nbug); i++) fprintf(out,"\\item %s\n",check_tex(bugs[i])); fprintf(out,"\\end{itemize}\n"); } /* fprintf(out,"\n\\newpage\n"); */ }
void pr_def(FILE *fp, int ftp) { const t_deffile *df; const char *s = NULL; char *flst, *tmp, *desc; const char *ext; const char *defnm; df = &(deffile[ftp]); defnm = ftp2defnm(ftp); /* find default file extension and \tt-ify description */ /* FIXME: The constness should not be cast away */ flst = (char *) ""; desc = strdup(df->descr); if (df->ntps) { ext = deffile[df->tps[0]].ext; tmp = strstr(desc, ": ") + 1; if (tmp) { tmp[0] = '\0'; tmp++; snew(flst, strlen(tmp)+6); strcpy(flst, " \\tt "); strcat(flst, tmp); } } else { ext = df->ext; } /* now skip dot */ if (ext[0]) { ext++; } else { ext = ""; } /* set file contents type */ switch (df->ftype) { case eftASC: s = "Asc"; break; case eftBIN: s = "Bin"; break; case eftXDR: s = "xdr"; break; case eftGEN: s = ""; break; default: gmx_fatal(FARGS, "Unimplemented filetype %d %d", ftp, df->ftype); } fprintf(fp, "\\tt %8s & \\tt %3s & %3s & \\tt %2s & %s%s \\\\[-0.1ex]\n", defnm, ext, s, df->defopt ? df->defopt : "", check_tex(desc), check_tex(flst)); free(desc); }