DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ A T

⟦e00e89150⟧ TextFile

    Length: 2229 (0x8b5)
    Types: TextFile
    Names: »ACTION_C«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

#include <stdio.h>
#include <Xm/Xm.h>

Widget Z80Widget;

void OpenWindow(int frame,char *field)
{
Widget TopLevel;

    if (!strcmp(field,"Z80"))
    {
      TopLevel = FmInitialize ("Z80", "Z80", NULL, 0, NULL, 0);
      Z80Widget = FmCreateZ80 ("Z80", TopLevel, NULL, 0);
      SetFrameWidget(frame,Z80Widget);
      BreakInit(Z80Widget);  
      return;
    }
    if (!strcmp(field,"MEM"))
    {
      TopLevel = FmCreateMEM ("MEM", Z80Widget, NULL, 0);
      SetFrameWidget(frame,TopLevel);
      return;
    }
    if (!strcmp(field,"ACIA"))
    {
      TopLevel = FmCreateACIA ("ACIA", Z80Widget, NULL, 0);
      SetFrameWidget(frame,TopLevel);
      return;
    }
    if (!strcmp(field,"PPI"))
    {
      TopLevel = FmCreatePPI ("PPI", Z80Widget, NULL, 0);
      SetFrameWidget(frame,TopLevel);
      return;
    }
    if (!strcmp(field,"PTM"))
    {
      TopLevel = FmCreatePTM ("PTM", Z80Widget, NULL, 0);
      SetFrameWidget(frame,TopLevel);
      return;
    }
    printf("*** Unknown Window %s to opened (Action.c)\n",field);
    return;
}

void CloseWindow(int frame)
{
    FmHideWidget(GetFrameWidget(frame));
    FreeFrame(frame); 
}

void PutField(frame,field,value)
{
 Widget field_w;

 field_w=XtNameToWidget(GetFrameWidget(frame),field);
#ifdef DEBUG0
 printf(" -> PUT_FIELD: frame:%d Window widget:%d Field widget:%d\n",
	frame,GetFrameWidget(frame),field_w);
#endif
 
 if (field_w == 0)
   printf("*** Widget of field %s not found (Action.c)\n",field);
 else
 {
   DisableChanged(GetFrameWidget(frame));
   XmTextSetString(field_w,value);
   EnableChanged(GetFrameWidget(frame));
 }
}

void Action(int frame, char *fctn, char *field, char *value)
{
#ifdef DEBUG0
  printf("ACTION: lf:%d,%s  fctn:%s  field:%s  value:\"%s\" \n",
	frame,GetFrameName(frame),fctn,field,value);
#endif

  if (!strcmp(fctn,"OpenWindow"))
    OpenWindow(frame,field);
  else
    if (!strcmp(fctn,"CloseWindow"))
      CloseWindow(frame);
   else 
     if (!strcmp(fctn,"PutField"))
       PutField(frame,field,value);
     else
     {
       printf("*** Unknown action to execute (Action.c)\n");
       printf("    lf:%d,%s  fctn:%s  field:%s value:\"%s\" \n",
    	       frame, GetFrameName(frame),fctn,field,value);
     }
}