~ubuntu-branches/ubuntu/raring/9base/raring

« back to all changes in this revision

Viewing changes to rc/pfnc.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-08-20 17:34:06 UTC
  • mfrom: (6.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090820173406-xpwqa9ruyevvc0ut
Tags: 1:3-3
* Updating maintainer field.
* Updating vcs fields.
* Updating package to standards version 3.8.3.
* Updatin variables writing in rules to consistent style.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
struct{
6
6
        void (*f)(void);
7
7
        char *name;
8
 
}fname[]={
 
8
}fname[] = {
9
9
        Xappend, "Xappend",
10
10
        Xasync, "Xasync",
11
11
        Xbang, "Xbang",
18
18
        Xjump, "Xjump",
19
19
        Xmark, "Xmark",
20
20
        Xpopm, "Xpopm",
 
21
        Xrdwr, "Xrdwr",
21
22
        Xread, "Xread",
22
23
        Xreturn, "Xreturn",
23
24
        Xtrue, "Xtrue",
50
51
        Xrdfn, "Xrdfn",
51
52
        Xqdol, "Xqdol",
52
53
0};
53
 
void pfnc(io *fd, thread *t)
 
54
 
 
55
void
 
56
pfnc(io *fd, thread *t)
54
57
{
55
58
        int i;
56
 
        void (*fn)(void)=t->code[t->pc].f;
 
59
        void (*fn)(void) = t->code[t->pc].f;
57
60
        list *a;
58
61
        pfmt(fd, "pid %d cycle %p %d ", getpid(), t->code, t->pc);
59
 
        for(i=0;fname[i].f;i++) if(fname[i].f==fn){
 
62
        for(i = 0;fname[i].f;i++) if(fname[i].f==fn){
60
63
                pstr(fd, fname[i].name);
61
64
                break;
62
65
        }
63
 
        if(!fname[i].f) pfmt(fd, "%p", fn);
64
 
        for(a=t->argv;a;a=a->next) pfmt(fd, " (%v)", a->words);
 
66
        if(!fname[i].f)
 
67
                pfmt(fd, "%p", fn);
 
68
        for(a = t->argv;a;a = a->next) pfmt(fd, " (%v)", a->words);
65
69
        pchr(fd, '\n');
66
70
        flush(fd);
67
71
}