コード例 #1
0
ファイル: tzpnupgd.c プロジェクト: arksoftgit/10c
zOPER_EXPORT zSHORT OPERATION
IncludeAttributeMapping( zVIEW    vSubtask,
                         zVIEW    OrigW,
                         zVIEW    OrigWC )
{
#if 0
   zVIEW    vLOD;
   zVIEW    LOD_List;
   zVIEW    vDomain;
   zVIEW    DomainList;
   zSHORT   nZRetCode;
   zSHORT   RESULT;
   zCHAR    szTempString_0[ 33 ];

   RetrieveViewForMetaList( vSubtask, &LOD_List, zREFER_LOD_META );
   GetStringFromAttribute( szTempString_0, OrigW, "LOD", "Name" );
   SetCursorFirstEntityByString( LOD_List, "W_MetaDef", "Name", szTempString_0, "" );
   ActivateMetaOI( vSubtask, &vLOD, LOD_List, zREFER_LOD_META, zSINGLE );
   GetStringFromAttribute( szTempString_0, OrigWC, "CtrlMap", "X_EntityName" );
   RESULT = SetCursorFirstEntityByString( vLOD, "LOD_Entity", "Name", szTempString_0, "" );
   if ( RESULT >= 0 )
   {
      nZRetCode = GetStringFromAttribute( szTempString_0, OrigWC, "CtrlMap", "X_AttributeName" );
      RESULT = SetCursorFirstEntityByString( vLOD, "ER_Attribute", "Name", szTempString_0, "LOD_Entity" );
      if ( RESULT >= 0 )
      {
         nZRetCode = IncludeSubobjectFromSubobject( OrigWC, "CtrlMapLOD_Attribute", vLOD, "LOD_Attribute", zPOS_AFTER );
         if ( CompareAttributeToString ( OrigWC, "CtrlMap", "X_Context", "" ) != 0 )
         {
            nZRetCode = RetrieveViewForMetaList( vSubtask, &DomainList, zREFER_DOMAIN_META );
            nZRetCode = GetStringFromAttribute( szTempString_0, vLOD, "Domain", "Name" );
            RESULT = SetCursorFirstEntityByString( DomainList, "W_MetaDef", "Name", szTempString_0, "" );
            nZRetCode = ActivateMetaOI( vSubtask, &vDomain, DomainList, zREFER_DOMAIN_META, zSINGLE );
            nZRetCode = GetStringFromAttribute( szTempString_0, OrigWC, "CtrlMap", "X_Context" );
            RESULT = SetCursorFirstEntityByString( vDomain, "Context", "Name", szTempString_0, "" );
            if ( RESULT >= 0 )
            {
               nZRetCode = IncludeSubobjectFromSubobject( OrigWC, "CtrlMapContext", vDomain, "Context", zPOS_AFTER );
            }
            nZRetCode = DropMetaOI( vSubtask, vDomain );
            nZRetCode = DropView( DomainList );
         }
      }
   }

   nZRetCode = DropMetaOI( vSubtask, vLOD );
   nZRetCode = DropView( LOD_List );
#endif
   return( 0 );
}
コード例 #2
0
ファイル: tzeremdo.c プロジェクト: DeegC/ZeidonTools
/////////////////////////////////////////////////////////////////////////////
//
// OPERATION: oTZEREMDO_GetRefViewForER
//
// PURPOSE:   Get access to ER View for Reference.  Activate if not loaded
//            and get at application level if loaded.
//
/////////////////////////////////////////////////////////////////////////////
zOPER_EXPORT zSHORT OPERATION
oTZEREMDO_GetRefViewForER( zVIEW  vSubtask,
                           zPVIEW pvTZEREMDO,
                           zSHORT nCurrentOrReload )
{
   zVIEW  vTZERMFLO;
   zSHORT nRC;

// Get Access to ERD File List Object
   nRC = RetrieveViewForMetaList( vSubtask, &vTZERMFLO, zREFER_ERD_META );
   if ( nRC < 0 )
   {
      *pvTZEREMDO = 0;
      return( -2 );
   }

   if ( SetCursorFirstEntity( vTZERMFLO, "W_MetaDef", "" ) < zCURSOR_SET )
   {
      return( -2 );
   }

   nRC = ActivateMetaOI( vSubtask, pvTZEREMDO, vTZERMFLO,
                         zREFER_ERD_META,
                         zSINGLE | zLEVEL_APPLICATION );
   return( nRC );
}
コード例 #3
0
ファイル: tzvminaa.c プロジェクト: DeegC/10d
//
// OPERATION:   InitializeInterpretor
//
// DESCRIPTION: InitializeInterpretor does all of the set up for the VML
//    interpretor. Loads the XPG File. Next be sure that we have access to
//   the global as well as Zeidon operation lists. Also Init two Globals.
//
zOPER_EXPORT zSHORT OPERATION
InitInterp( zVIEW  lpInterpSubtask,
            zVIEW  lpAppSubtask,
            zPCHAR szSrcDLLName )
{
   zVIEW  vStackObject;
// zVIEW  vViewObject;
   zVIEW  vTZOPGRPO;
   zCHAR  szExecDir[ zMAX_FILESPEC_LTH + 1 ];                   // dir string
   zSHORT nRC;

   nRC = LoadXPG( lpInterpSubtask, lpAppSubtask, szSrcDLLName, "C" );
   if ( nRC != 0 ) //  failed
      return( -1 );

   if ( GetViewByName( &vStackObject, "StackObject", lpInterpSubtask, zLEVEL_SUBTASK ) != zLEVEL_SUBTASK )
   {
      // activate an empty stack object.
      ActivateEmptyObjectInstance( &vStackObject, "TZVSRTOO", lpInterpSubtask, zSINGLE );

      // create the root of the stack object.
      CreateEntity( vStackObject, "StackObject", zPOS_AFTER );

      // Name the Stack Object
      SetNameForView( vStackObject, "StackObject", lpInterpSubtask, zLEVEL_SUBTASK );
   }

#if 0 // DGC  The following to OIs do not appear to be used anywhere so I'm
      // removing them so that we don't need an LPLR to be active.
   // get access to the global operation list and the Zeidon operation list
   nRC = RetrieveViewForMetaList( vSubtask, &lpGOListView, zREFER_GO_META );
   if ( nRC < 0 ) //  failed
      lpGOListView = 0;

   // get a view to the Task LPLR
   if ( GetViewByName( &vViewObject, "TaskLPLR", vSubtask, zLEVEL_TASK ) != zLEVEL_TASK )
      return( -1 );
#endif

   if ( GetViewByName( &vTZOPGRPO, "TZOPSIGK.Interp", lpInterpSubtask, zLEVEL_TASK ) != zLEVEL_TASK )
   {
      // get the exec directory
      zgGetZeidonToolsDir( lpAppSubtask, szExecDir, zAPPL_DIR_OBJECT );

      // concat the name. and the .XGO extention
      strcat_s( szExecDir, zsizeof( szExecDir ), "TZOPSIGK.XGO" );

      nRC = ActivateOI_FromFile( &vTZOPGRPO, "TZOPGRPO", lpInterpSubtask, szExecDir, zSINGLE );

      if ( nRC < 0 ) //  failed
         vTZOPGRPO = 0;
      else
         SetNameForView( vTZOPGRPO, "TZOPSIGK.Interp", lpInterpSubtask, zLEVEL_TASK );
   }

   g_nStackPtr = 0;
   g_nCallStack[ 0 ] = 1;
   return( 0 );
}
コード例 #4
0
ファイル: tzedcwzd.c プロジェクト: DeegC/ZeidonTools
/*

   Loads a list of Objects (LODs) for the current lplr.

*/
zOPER_EXPORT zSHORT OPERATION
ObjList_Prebuild( zVIEW vSubtask )
{
   zVIEW vObjList;

   GetViewByName( &vObjList, "TZEDCWZD_TZCMLPLO_List", vSubtask, zLEVEL_TASK );
   if ( vObjList )
      DropView( vObjList );

   RetrieveViewForMetaList( vSubtask, &vObjList, zREFER_LOD_META );
   SetNameForView( vObjList, "TZEDCWZD_TZCMLPLO_List", vSubtask, zLEVEL_TASK );

   return( 0 );
}
コード例 #5
0
ファイル: tzpnupgd.c プロジェクト: arksoftgit/10c
zOPER_EXPORT zSHORT OPERATION
UpgradeDialog1( zVIEW    vSubtask,
                zVIEW    OrigW )
{
#if 0
   zVIEW    OrigWC;
   zVIEW    vPE;
   zVIEW    vType;
   zVIEW    LOD_List;
   zSHORT   nZRetCode;
   zLONG    lTempInteger_0;
   zSHORT   RESULT;

   nZRetCode = RetrieveViewForMetaList( vSubtask, &LOD_List, 2013 );
   nZRetCode = ActivateMetaOI( vSubtask, &vPE, LOD_List, 2013, zSINGLE );
   nZRetCode = ActivateOI_FromFile( &vType, "TZPACTLO", vSubtask, "c:\\10c\\W\\BIN\\SYS\\TZPACTLI.POR", zSINGLE );
   lTempInteger_0 = CheckExistenceOfEntity( OrigW, "SourceFile" );
   if ( lTempInteger_0 < 0 )
   {
      nZRetCode = CreateMetaEntity( vSubtask, OrigW, "SourceFile", zPOS_AFTER );
      SetAttributeFromAttribute( OrigW, "SourceFile", "Name", OrigW, "Dialog", "Tag" );
   }
   SetNameForView( vType, "vType", vSubtask, zLEVEL_TASK );
   SetNameForView( vPE, "vPE", vSubtask, zLEVEL_TASK );
   RESULT = SetCursorFirstEntity( OrigW, "Window", "" );
   while ( RESULT > zCURSOR_UNCHANGED )
   {
      nZRetCode = CreateViewFromViewForTask( &OrigWC, OrigW, 0 );
      nZRetCode = SetNameForView( OrigWC, "OrigWC", vSubtask, zLEVEL_TASK );
      RESULT = SetCursorFirstEntity( OrigW, "Action", "" );
//    while ( RESULT > zLEVEL_TASK )
      while ( RESULT >= 0 )
      {
         nZRetCode = UpgradeAction( vSubtask, OrigW );
         RESULT = SetCursorNextEntity( OrigW, "Action", "" );
      }
      RESULT = SetCursorFirstEntity( OrigWC, "Control", "" );
      while ( RESULT >= 0 )
      {
         nZRetCode = UpgradeControl( vSubtask, OrigW, OrigWC, vType, vPE );
         RESULT = SetCursorNextEntity( OrigWC, "Control", "" );
      }
      nZRetCode = DropView( OrigWC );
      RESULT = SetCursorNextEntity( OrigW, "Window", "" );
   }
#endif
   return( 0 );
}
コード例 #6
0
ファイル: tzedcwzd.c プロジェクト: DeegC/ZeidonTools
zOPER_EXPORT zSHORT OPERATION
VOR_Prebuild( zVIEW vSubtask )
{
   zVIEW  vEdWrk;
   zVIEW  vList;

   GetWorkView( &vEdWrk );
   GetViewByName( &vList, "TZEDCWZD_TZCMLPLO_List", vSubtask, zLEVEL_TASK );
   if ( vList )
      DropView( vList );

   RetrieveViewForMetaList( vSubtask, &vList, zREFER_VOR_META );
   SetNameForView( vList, "TZEDCWZD_TZCMLPLO_List", vSubtask, zLEVEL_TASK );

   return( 0 );
}
コード例 #7
0
ファイル: tzedcwzd.c プロジェクト: DeegC/ZeidonTools
zOPER_EXPORT zSHORT OPERATION
OBJ_Prebuild( zVIEW vSubtask )
{
   zSHORT   nRC;
   zVIEW    vOp;
   zVIEW    vSource;

   nRC = GetViewByName( &vOp, "TZEDCWZD_TZCMLPLO_List", vSubtask, zLEVEL_TASK );
   if ( nRC > 0 )
      DropView( vOp );

   RetrieveViewForMetaList( vSubtask, &vOp, zREFER_LOD_META );
   OrderEntityForView( vOp, "W_MetaDef", "Name A" );
   SetNameForView( vOp, "TZEDCWZD_TZCMLPLO_List", vSubtask, zLEVEL_TASK );

   // Make sure that there is no TZOPSRCO.
   nRC = GetViewByName( &vSource, "TZOPSRCO", vSubtask, zLEVEL_TASK );
   if ( vSource )
      DropMetaOI( vSubtask, vSource );

   return( 0 );
}
コード例 #8
0
ファイル: xwdgen.c プロジェクト: arksoftgit/10c
static void ProcessXwds( HWND hWnd, zVIEW vSubtask, zCHAR *cLogFile,
                         zCHAR cRemReadOnly)
{
   FILE *fLog=NULL;
   zVIEW vLPLR;
   zVIEW vDialog;
   zSHORT nRC;
   RECT rect;

   zCHAR szDialogName[32];
   zCHAR szMsg[256];
   zPCHAR pszPath;
   zCHAR szOrder[512];
   zCHAR szTargetPath[128];
   zCHAR szSourcePath[128];

   if ( cLogFile && cLogFile[0] )
      fLog = fopen( cLogFile, "w");

   if (cRemReadOnly == 'Y')
   {
      /* The program was called with parameter -r to remove the
      ** readonly attribute for all PWD-files. First we build a
      ** TMP-directory to save the original files. Then we remove
      ** the readonly attribute.
      */

      pszPath = getenv ("KZD");
      strcpy (szTargetPath, pszPath);
      strcat (szTargetPath, ":\\");
      pszPath = getenv ("KZV");
      strcat (szTargetPath, pszPath);
      strcpy (szSourcePath, szTargetPath);
      strcat (szTargetPath, "\\savexwd");
      strcat (szSourcePath, "\\a\\bin\\sys");

      strcpy (szOrder, "mkdir ");
      strcat (szOrder, szTargetPath);

      if (RunSystem (szOrder, hWnd, fLog) == -1)
      {
         if (fLog)
            fclose (fLog);
         return;
      }

      strcpy (szOrder, "xcopy ");
      strcat (szOrder, szSourcePath);
      strcat (szOrder, "\\*.pwd ");
      strcat (szOrder, szTargetPath);
      strcat (szOrder, " /K /Q");
      if (RunSystem (szOrder, hWnd, fLog) == -1)
      {
         if (fLog)
            fclose (fLog);
         return;
      }

      strcpy (szOrder, "attrib -r ");
      strcat (szOrder, szSourcePath);
      strcat (szOrder, "\\*.pwd");
      if (RunSystem (szOrder, hWnd, fLog) == -1)
      {
         if (fLog)
            fclose (fLog);
         return;
      }
   }

   RetrieveViewForMetaList( vSubtask, vSubtask, &vLPLR, zSOURCE_DIALOG_META );

   nRC = SetCursorFirstEntity( vLPLR, "W_MetaDef", "" );
   while ( nRC >= zCURSOR_SET )
   {
      GetStringFromAttribute( szDialogName,
                              vLPLR, "W_MetaDef", "Name" );

      nRC = ActivateMetaOI( &vDialog, vLPLR, zSOURCE_DIALOG_META, zSINGLE );
      if ( nRC < 0 )
      {
         zstrcpy( szMsg, "Could not Activate Dialog: " );
         zstrcat( szMsg, szDialogName );
         zstrcat( szMsg, ".\nAborting Build" );

         MessageBox( hWnd,
                  szMsg,
                  "Error Running xwdgen",
                  MB_OK | MB_ICONSTOP | MB_APPLMODAL );

         zstrcat( szMsg, "\n" );
         if ( fLog )
         {
            fputs( szMsg,fLog );
            fclose (fLog);
         }

         return ;
      }
      else
      {
         /* The dialog ACCOUNT.PWD isn't ok. Therefore we get an error message
         ** while saving the dialog and the releasebuilding system isn't running.
         ** We don't save the dialog ACCOUNT.PWD until the bug is fixed. This dialog
         ** is an example and not needed for a release.  RG, 17.12.1999
         */
         if (   strncmp (szDialogName, "TZ", 2) == 0
             || strncmp (szDialogName, "tz", 2) == 0
            )
         {
            // Send message that we are saving the XWD.
            strcpy( szMsg, "Saving Dialog: " );
            strcat( szMsg, szDialogName );
            strcpy( szOutLine, szMsg );
            GetClientRect( hWnd, &rect );
            InvalidateRect( hWnd, &rect, TRUE );
            UpdateWindow( hWnd );

            TraceLineS( "xwdgen: ", szMsg );

            if ( fLog )
            {
               zstrcat( szMsg, "\n" );
               fputs( szMsg,fLog );
            }
            else
               TraceLineS( szMsg, "" );

            SetCursorFirstEntity( vDialog, "Window", "" );
            CommitMetaOI( vDialog, zSOURCE_DIALOG_META );
            DropView( vDialog );
         }
         nRC = SetCursorNextEntity( vLPLR, "W_MetaDef", "" );
      }
   }

   if (cRemReadOnly == 'Y')
   {
      /* After saving the PWD and XWD files we have to get
      ** back the original files with readonly attribute
      */
      strcpy (szOrder, "xcopy ");
      strcat (szOrder, szTargetPath);
      strcat (szOrder, "\\*.pwd ");
      strcat (szOrder, szSourcePath);
      strcat (szOrder, " /K /Q");
      if (RunSystem (szOrder, hWnd, fLog) == -1)
      {
         if (fLog)
            fclose (fLog);
         return;
      }

      strcpy (szOrder, "rmdir /S /Q ");
      strcat (szOrder, szTargetPath);
      RunSystem (szOrder, hWnd, fLog);
   }

   if (fLog)
      fclose (fLog);
   else
      TraceLineS( "Completed XWD build", "" );

   return;

}
コード例 #9
0
ファイル: tzhkeyad.c プロジェクト: DeegC/ZeidonTools
/////////////////////////////////////////////////////////////////////////////
//
// ENTRY:
//
// PURPOSE:    Create a HK if one doesn't exist for current LPLR.
//
/////////////////////////////////////////////////////////////////////////////
zOPER_EXPORT zSHORT OPERATION
zwTZHKEYAD_InitHK_ForLPLR( zVIEW vSubtask )
{
   zVIEW vCM_List;
   zVIEW vKZHKEYSO;
   zVIEW vTaskLPLR;
   zCHAR  szFileSpec[ zMAX_FILESPEC_LTH + 1 ];
// zSHORT nRC;

   RetrieveViewForMetaList( vSubtask, &vCM_List, zREFER_GO_META );
   SetNameForView( vCM_List, "CM_List", vSubtask, zLEVEL_TASK );
#if 0
   // Get File list of Presentation Environments (only one).
   nRC = RetrieveViewForMetaList( vSubtask, &vCM_List, zREFER_HKEY_META );

   // Always have a Named List of PPE's (even though there can only be One)!
   // This is done to be consistent with other dialogs.  The only time the
   // that the named List will not exist is during a SwithLPLR.
   // This fact is used a "flag" to the ReturnFromSubWnd logic.
   nRC = SetNameForView( vCM_List, "CM_HK_List", vSubtask, zLEVEL_TASK );

   // See if one exists.
   nRC = SetCursorFirstEntity( vCM_List, "W_MetaDef", "" );

   // If not, create one, else open it.
   if ( nRC == zCURSOR_NULL )
   {
   // oTZPESRCO_GrayOptions( vSubtask );
   }
   else
   {
      nRC = ActivateMetaOI( vSubtask, &vKZHKEYSO, vCM_List, zREFER_HKEY_META, zSINGLE );
      SetNameForView( vKZHKEYSO, "TZPESRCV", vSubtask, zLEVEL_TASK );
      CreateViewFromViewForTask( &vCtrlList, vKZHKEYSO, 0 );
      SetNameForView( vCtrlList, "TZPECTRL", vSubtask, zLEVEL_TASK );
      SetAttributeFromInteger( vKZHKEYSO, "ApplHKyDef", "CtrlFontDel", 0 );
   }
#endif

   // Get the directory.
   GetViewByName( &vTaskLPLR, "TaskLPLR", vSubtask, zLEVEL_TASK );
   if ( vTaskLPLR == 0 )
   {
      MessageSend( vSubtask, "HK00101", "Hot Keys",
                   "Can't locate LPLR?",
                   zMSGQ_OBJECT_CONSTRAINT_ERROR, zBEEP );
      return( 0 );
   }

   GetStringFromAttribute( szFileSpec, vTaskLPLR, "LPLR", "MetaSrcDir" );
   zstrcat( szFileSpec, "\\ZEIDON.PHK" );
   TraceLineS( "Hotkey Dialog opening file: ", szFileSpec );

   // Load the HKEY object.
   if ( ActivateOI_FromFile( &vKZHKEYSO, "KZHKEYSO", vSubtask, szFileSpec,
            zIGNORE_ERRORS | zSINGLE | zLEVEL_APPLICATION | zNOI_OKAY ) < 0 )
   {
      CreateEntity( vKZHKEYSO, "Application", zPOS_AFTER );
      CommitOI_ToFile( vKZHKEYSO, szFileSpec, zASCII );
   }

   SetNameForView( vKZHKEYSO, "KZHKEYSO", vSubtask, zLEVEL_TASK );
   return( 0 );
}
コード例 #10
0
ファイル: tzzmaind.c プロジェクト: DeegC/ZeidonTools
/////////////////////////////////////////////////////////////////////////////
//
// OPERATION:    zwTZZMAIND_Postbuild
//
// PURPOSE:
//
/////////////////////////////////////////////////////////////////////////////
zOPER_EXPORT zSHORT OPERATION
zwTZZMAIND_PostBuild( zVIEW vSubtask )
{
   zSHORT nRC;
   zCHAR  szLPL_Name[ 34 ];
   zVIEW  vLPL;
   zVIEW  vMetaList;

   InitializeLPLR( vSubtask, "" );
   nRC = GetViewByName( &vLPL, "TaskLPLR", vSubtask, zLEVEL_TASK );
   if ( nRC > 0 )
   {
      GetStringFromAttribute( szLPL_Name, vLPL, "LPLR", "Name" );
      SetWindowCaptionTitle( vSubtask, 0, szLPL_Name );
   }

   // Get view to all list types
   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_SA_META );
   SetNameForView( vMetaList, "TZERDS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_SA_META );
   SetNameForView( vMetaList, "TZERDR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_DOMAIN_META );
   SetNameForView( vMetaList, "TZDMNS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_DOMAIN_META );
   SetNameForView( vMetaList, "TZDMNR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_DTE_META );
   SetNameForView( vMetaList, "TZDBMS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_DTE_META );
   SetNameForView( vMetaList, "TZDBMR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_LOD_META );
   SetNameForView( vMetaList, "TZLODS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_LOD_META );
   SetNameForView( vMetaList, "TZLODR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_DIALOG_META );
   SetNameForView( vMetaList, "TZDLGS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_DIALOG_META );
   SetNameForView( vMetaList, "TZDLGR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_PENV_META );
   SetNameForView( vMetaList, "TZPENS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_PENV_META );
   SetNameForView( vMetaList, "TZPENR", vSubtask, zLEVEL_TASK );

   RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_GO_META );
   SetNameForView( vMetaList, "TZOPRS", vSubtask, zLEVEL_TASK );
   RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_GO_META );
   SetNameForView( vMetaList, "TZOPRR", vSubtask, zLEVEL_TASK );

   MB_SetMessage( vSubtask, 1, "?" );
   MB_SetMessage( vSubtask, 2, "*" );
   return( 0 );
}
コード例 #11
0
ファイル: xodgen.c プロジェクト: kellysautter/10cKelly
static void ProcessXods( HWND hWnd, zVIEW vSubtask,
                          zCHAR *cTE_Name, zCHAR *cLogFile, zCHAR cNet )
{
   FILE *fLog=NULL;
   zVIEW vTaskLPLR = NULL;
   zCHAR szMsg[ 256 ];
   zVIEW vTZTEDBLO, vDTE, vCM_List;
   zVIEW vLOD, vLOD_List, vXOD;
   zVIEW vTemp = NULL;
   zVIEW vT=NULL;
   zSHORT nRC;
   RECT rect;
   LPLIBRARY hLib = NULL;
   zCHAR szLODName[ 32 ];
   zCHAR szFileName[ 256 ];
   zCHAR szNetwork[ 256 ];

   if ( cLogFile && cLogFile[0] )
      fLog = fopen( cLogFile, "w");

   memset (szNetwork, 0, 256);
   SysReadZeidonIni( -1, "[Zeidon]", "DefaultNetWork", szNetwork );
   if (*szNetwork == 0)
   {
      strcpy( szMsg, "No default Network set" );
      MessageBox( hWnd, szMsg,
                  "Error Running xodgen",
                  MB_OK | MB_ICONSTOP | MB_APPLMODAL );
      zstrcat( szMsg, "\n" );
      if ( fLog )
      {
         fputs( szMsg,fLog );
         fclose (fLog);
      }
      return;
   }

   ActivateOI_FromFile( &vTZTEDBLO, "tztedblo", vSubtask, "tztedblo.xdl",
                        zMULTIPLE );
   SetNameForView( vTZTEDBLO, "TZTEDBLO", 0, zLEVEL_TASK );

   //oTZTENVRO_GetUpdViewForDTE_P
   nRC = RetrieveViewForMetaList( vSubtask, vSubtask, &vCM_List, zSOURCE_DTE_META );

   nRC = ActivateMetaOI( &vDTE, vCM_List, zSOURCE_DTE_META,
                            zSINGLE | zACTIVATE_ROOTONLY );
   if ( nRC < 0 )
   {
      strcpy( szMsg, "Internal error activating TE" );
      MessageBox( hWnd, szMsg,
                  "Error Running xodgen",
                  MB_OK | MB_ICONSTOP | MB_APPLMODAL );
      zstrcat( szMsg, "\n" );
      if ( fLog )
      {
         fputs( szMsg,fLog );
         fclose (fLog);
      }
      return;
   }
   SetNameForView( vDTE, "TE_DB_Environ", vSubtask, zLEVEL_TASK );
   // Position on given DBMS Source
   nRC = SetCursorFirstEntityByString( vDTE,
               "TE_DBMS_Source", "Name", cTE_Name, 0 );
   if ( nRC < zCURSOR_SET )
   {
      strcpy( szMsg, "Invalid TE Name :");
      strcat( szMsg, cTE_Name );
      MessageBox( hWnd, szMsg,
                  "Error Running xodgen",
                  MB_OK | MB_ICONSTOP | MB_APPLMODAL );
      zstrcat( szMsg, "\n" );
      if ( fLog )
      {
         fputs( szMsg,fLog );
         fclose (fLog);
      }
      return;
   }

   nRC = GetViewByName( &vTaskLPLR, "TaskLPLR", 0, zLEVEL_TASK );
   assert(nRC >= 0 ) ;

   // Check for network build
   if ( cNet )
   {
      // Use default network for Ton Beller (DBMS = "Network Server")
      SetCursorFirstEntityByString( vTZTEDBLO, "TE_DBMS_Source", "Network",
                                    szNetwork, 0 );
      SetAttributeFromAttribute( vDTE,      "TE_DBMS_Source", "DBMS",
                                 vTZTEDBLO, "TE_DBMS_Source", "DBMS" );
      SetAttributeFromAttribute( vDTE,      "TE_DBMS_Source", "Network",
                                 vTZTEDBLO, "TE_DBMS_Source", "Network" );
   }
   else
   {
      // Position on corresponding DBMS entry in DB Handler object.
      SetCursorFirstEntityByAttr( vTZTEDBLO, "TE_DBMS_Source", "DBMS",
                                 vDTE, "TE_DBMS_Source", "DBMS", 0 );

   }


   //zwTZTEUPDD_BuildXODsOnLPLR( zVIEW vSubtask )

   // Create a view that lists all LODs.

   RetrieveViewForMetaList( vSubtask, vSubtask, &vLOD_List, zREFER_LOD_META );
   OrderEntityForView( vLOD_List, "W_MetaDef", "Name A" );
   SetNameForView( vLOD_List, "TZZOLFLO", vSubtask, zLEVEL_TASK );

   // Loop through each of the LOD's
   // WMetaType.Type= zREFER_LOD_META
   //
   for ( nRC = SetCursorFirstEntity( vLOD_List, "W_MetaDef", "" );
         nRC >= zCURSOR_SET;
         nRC = SetCursorNextEntity( vLOD_List, "W_MetaDef", "" ) )
   {

      GetStringFromAttribute( szLODName,
                              vLOD_List, "W_MetaDef", "Name" );

      nRC = ActivateMetaOI( &vLOD, vLOD_List, zREFER_LOD_META, zCURRENT_OI );
      if ( nRC < 0 )
      {
         zstrcpy( szMsg, "Could not Activate LOD: " );
         zstrcat( szMsg, szLODName );
         zstrcat( szMsg, ".\nAborting Build" );

         MessageBox( hWnd,
                  szMsg,
                  "Error Running xodgen",
                  MB_OK | MB_ICONSTOP | MB_APPLMODAL );

         zstrcat( szMsg, "\n" );
         if ( fLog )
         {
            fputs( szMsg,fLog );
            fclose (fLog);
         }

         return ;
      }
      else
      {
         // Send message that we are building the LOD.
         strcpy( szMsg, "Building executable for LOD: " );
         strcat( szMsg, szLODName );
         strcat( szMsg, "." );
         strcpy( szOutLine, szMsg );
         GetClientRect( hWnd, &rect );
         InvalidateRect( hWnd, &rect, TRUE );
         UpdateWindow( hWnd );

         if ( fLog )
         {
           zstrcat( szMsg, "\n" );
           fputs( szMsg,fLog );
         }
         else
            TraceLineS( szMsg, "" );

         // Make sure the TE_SourceZKey attribute is set because it determines
         // what DBMS_Source is used in building the XOD.
         if ( CheckExistenceOfEntity( vLOD, "POD" ) >= zCURSOR_SET )
            SetAttributeFromAttribute ( vLOD, "POD", "TE_SourceZKey",
                                       vDTE, "TE_DBMS_Source", "ZKey" );

         // Build the XOD in memory
         oTZZOXODO_SaveXOD( vLOD );
         SetNameForView( vLOD, "TZZOLODO", 0, zLEVEL_TASK );
         DropMetaOI( vSubtask, vLOD );

         // Commit the XOD to LPLR file.
         GetViewByName( &vXOD, "TZZOXODO", 0, zLEVEL_TASK );
         GetStringFromAttribute( szFileName,
                                 vTaskLPLR, "LPLR", "ExecDir" );
         ofnTZCMWKSO_AppendSlash( szFileName );
         zstrcat( szFileName, szLODName );
         zstrcat( szFileName, ".XOD" );
         CommitOI_ToFile( vXOD, szFileName, zSINGLE );
      }
   }

   if (fLog)
      fclose (fLog);
   else
      TraceLineS( "Completed XOD build", "" );

   return;

}
コード例 #12
0
ファイル: tzedcwzd.c プロジェクト: DeegC/ZeidonTools
/*

   This operation builds the operation list for the OperationList window.
   Depending on what the value is for vProfileXFER.ED.OpIns_CurrentType
   we build different operations lists.

*/
zOPER_EXPORT zSHORT OPERATION
OpIns_BuildOperList( zVIEW vSubtask )
{
#define DISP_SELECT_SET    1
#define SEL_SELECT_SET     2

   zCHAR  szCurrentType[ 5 ];
   zVIEW  vProfileXFER;
   zVIEW  vEdWrk;
   zSHORT nRC;
   zCHAR  szKeyword[ 255 ];
   zLONG  lSelectCount = 0;

   GetWorkView( &vEdWrk );
   GetProfileView( &vProfileXFER );
   GetStringFromAttribute( szCurrentType, vProfileXFER, "ED",
                           "OpIns_CurrentType" );

   // Default of CurrentType is 'Z'...
   if ( *szCurrentType == 0 )
   {
      zstrcpy( szCurrentType, "Z" );
      SetAttributeFromString( vProfileXFER, "ED", "OpIns_CurrentType",
                              szCurrentType );
   }

   // Check to see if the operations for the current type are already
   // loaded. If they are, then we obviously don't need to load them again.
   if ( SetCursorFirstEntityByString( vEdWrk, "OperListType", "Type",
                                      szCurrentType, 0 ) != zCURSOR_SET )
   {
      // Operations haven't been loaded yet, so load 'em up.

      CreateEntity( vEdWrk, "OperListType", zPOS_LAST );
      SetAttributeFromString( vEdWrk, "OperListType", "Type", szCurrentType );

      switch ( *szCurrentType )
      {
         case 'Z':
         {
            zVIEW vTZOPSIGK;

            // Get list of Zeidon operations.

            // Check to see if we've already activated the Zeidon opers list.
            // If not, activate it and save the view.
            GetViewByName( &vTZOPSIGK, "TZOPSIGK", vSubtask, zLEVEL_TASK );
            if ( !vTZOPSIGK )
            {
               oTZOPGRPO_GetViewForXGO( vSubtask, &vTZOPSIGK, zSYS_CURRENT_OI );
               SetNameForView( vTZOPSIGK, "TZOPSIGK", vSubtask, zLEVEL_TASK );
            }

            // Now copy each of the operations to the editor work object.
            for ( nRC = SetCursorFirstEntity( vTZOPSIGK, "Operation", 0 );
                  nRC == zCURSOR_SET;
                  nRC = SetCursorNextEntity( vTZOPSIGK, "Operation", 0 ) )
            {
               CreateEntity( vEdWrk, "Oper", zPOS_LAST );
               SetMatchingAttributesByName( vEdWrk, "Oper",
                                            vTZOPSIGK, "Operation", zSET_ALL );
            }

            break;
         } // Case 'Z'...

         case 'G':
         {
            zVIEW vOp;

            // Get list of Global operations.

            RetrieveViewForMetaList( vSubtask, &vOp, zREFER_GO_META );

            // Now copy each of the operations to the editor work object.
            for ( nRC = SetCursorFirstEntity( vOp, "W_MetaDef", 0 );
                  nRC == zCURSOR_SET;
                  nRC = SetCursorNextEntity( vOp, "W_MetaDef", 0 ) )
            {
               CreateEntity( vEdWrk, "Oper", zPOS_LAST );
               SetMatchingAttributesByName( vEdWrk, "Oper",
                                            vOp, "W_MetaDef", zSET_ALL );
            }

            DropView( vOp );

            break;
         } // Case 'G'...

         case 'L':
         {
            zVIEW vMeta;
            zLONG lMetaType;

            // Get list of "Local" operations.  "Local" operations in this
            // case mean all operations that are for the current meta.
            // For example, if the current meta is a Dialog, then the "Local"
            // operations include local and Dialog operations.

            // Get the source view and the meta type.
            GetIntegerFromAttribute( (zPLONG) &vMeta, vEdWrk, "Buffer",
                                     "SourceViewID" );
            GetIntegerFromAttribute( &lMetaType, vEdWrk, "Buffer",
                                     "MetaType" );

            // Create a new, temp view of the meta so that we can muck around
            // with the cursors.
            CreateViewFromViewForTask( &vMeta, vMeta, 0 );

            //
            // Now copy the "Local" meta operations to vEdWrk.
            //

            if ( lMetaType == zREFER_DIALOG_META ||
                 lMetaType == zREFER_LOD_META )
            {
               // Make sure we are reading the "Local" operations for
               // the current source file.
               SetCursorFirstEntityByAttr( vMeta, "SourceFile", "Name",
                                           vEdWrk, "Buffer",
                                           "SourceFileName", 0 );
            }

            // Copy all the operations to vEdWrk
            for ( nRC = SetCursorFirstEntity( vMeta, "Operation", 0 );
                  nRC == zCURSOR_SET;
                  nRC = SetCursorNextEntity( vMeta, "Operation", 0 ) )
            {
               CreateEntity( vEdWrk, "Oper", zPOS_LAST );
               SetMatchingAttributesByName( vEdWrk, "Oper",
                                            vMeta, "Operation",
                                            zSET_ALL );
            }

            DropView( vMeta );

            break;

         } // Case 'L'...

         case 'O':
         {
            // Since we load the object operations by object, we don't have
            // to do anything here.
            break;

         } // Case 'O'...

         default:
            SysMessageBox( "Zeidon Internal",
                           "This operation type not yet supported", 0 );
            break;

      } // switch ( *szCurrentType )...

      // Now that we've loaded the operations, sort them.
      OrderEntityForView( vEdWrk, "Oper", "Name A" );

   } // if ( SetCursor...)...

   // Disable the "Objects" button unless we are showing object operations.
   if ( *szCurrentType == 'O' )
      SetCtrlState( vSubtask, "ListObjects", zCONTROL_STATUS_ENABLED, TRUE );
   else
      SetCtrlState( vSubtask, "ListObjects", zCONTROL_STATUS_ENABLED, FALSE );

   // Now set the select states depending on the keyword values.
   GetStringFromAttribute( szKeyword, vProfileXFER, "ED", "OpIns_Keyword" );
   if ( *szKeyword &&
        CompareAttributeToString( vProfileXFER,
                                  "ED", "OpIns_UseKeyword", "Y" ) == 0 )
   {
      zCHAR  szIgnoreCase[ 5 ];
      zPCHAR pszKeyword;
      zBOOL  bStartColOne;
      zSHORT nKeywordLth;

      // De-select all operations.
      SetAllSelectStatesForEntity( vEdWrk, "Oper", FALSE, 0 );

      GetStringFromAttribute( szIgnoreCase, vProfileXFER, "ED",
                              "OpIns_KeywordIgnoreCase" );
      if ( *szIgnoreCase == 'Y' )
      {
         for ( pszKeyword = szKeyWord; *pszKeyword; pszKeyword++ )
            *pszKeyword = ztoupper( *pszKeyword );
      }

      // If the keyword starts with a "/", then the keyword search starts
      // with the first zCHAR (e.g. column) ONLY.
      pszKeyword = szKeyword;
      if ( *pszKeyword == '/' )
      {
         pszKeyword++;
         bStartColOne = TRUE;
         nKeywordLth = zstrlen( pszKeyword );
      }
      else
         bStartColOne = FALSE;

      for ( nRC = SetCursorFirstEntity( vEdWrk, "Oper", 0 );
            nRC == zCURSOR_SET;
            nRC = SetCursorNextEntity( vEdWrk, "Oper", 0 ) )
      {
         zCHAR  szOperName[ 255 ];

         GetStringFromAttribute( szOperName, vEdWrk, "Oper", "Name" );
         if ( *szIgnoreCase == 'Y' )
            strupr( szOperName );

         if ( bStartColOne )
         {
            if ( zstrncmp( szOperName, pszKeyword, nKeywordLth ) == 0 )
            {
               SetSelectStateOfEntity( vEdWrk, "Oper", TRUE );
               lSelectCount++;
            }
         }
         else
         {
            if ( strstr( szOperName, pszKeyword ) )
            {
               SetSelectStateOfEntity( vEdWrk, "Oper", TRUE );
               lSelectCount++;
            }
         }
      } // for...
   }
   else
   {
      // Select all operations.
      SetAllSelectStatesForEntity( vEdWrk, "Oper", TRUE, 0 );
      lSelectCount = CountEntitiesForView( vEdWrk, "Oper" );
   }

   //SetSelectSetForView( vEdWrk, nOldSelectSet );
   SetCursorFirstSelectedEntity( vEdWrk, "Oper", 0 );
   LB_SetDisplaySelectSet( vSubtask, "OperationList", DISP_SELECT_SET );
   LB_SetSelectSelectSet( vSubtask, "OperationList", SEL_SELECT_SET );

   // Re-use szKeyword to set the message...
   sprintf( szKeyword, "%d Operations listed", lSelectCount );
   MB_SetMessage( vSubtask, 0, szKeyword );

   RefreshWindow( vSubtask );

   return( 0 );

} // OpIns_BuildOperList
コード例 #13
0
ファイル: tzedcwzd.c プロジェクト: DeegC/ZeidonTools
zOPER_EXPORT zSHORT OPERATION
AEQ_SelectView( zVIEW vSubtask )
{
   zSHORT nRC;
   zVIEW  vList;
   zVIEW  vLOD;
   zVIEW  vEdWrk;
   zPCHAR szLOD_Name;
   zPCHAR szName;

   GetWorkView( &vEdWrk );
   if ( vEdWrk == 0 )
   {
      zCHAR sz[ 200 ];

      zstrcpy( sz, "TZEDWRKO not Available at ObjSelAQ_ObjSelView." );
      OperatorPrompt( 0, "ED - Error", sz, 0, zBUTTONS_OK, 0, zICON_STOP );
      return( zCALL_ERROR );
   }

   // If Entity entity exists, then the LOD has already been loaded for
   // for this view.  Exit because nothing else needs to be done.
   if ( CheckExistenceOfEntity( vEdWrk, "Entity" ) == zCURSOR_SET )
   {
      AEQ_RefreshAEQ( vSubtask );
      return( 0 );
   }

   // Activate the LOD specified by vEdWrk.View.ObjectName
   GetAddrForAttribute( &szLOD_Name, vEdWrk, "View", "ObjectName" );
   nRC = RetrieveViewForMetaList( vSubtask, &vList, zREFER_LOD_META );
   nRC = SetCursorFirstEntity( vList, "W_MetaDef", "" );
   while ( nRC == zCURSOR_SET )
   {
      GetAddrForAttribute( &szName, vList, "W_MetaDef", "Name" );
      if ( zstrcmpi( szName, szLOD_Name ) == 0 )
         break;

      nRC = SetCursorNextEntity( vList, "W_MetaDef", "" );
   }

   if ( nRC != zCURSOR_SET )
   {
      zCHAR sz[ 200 ];

      DropView( vList );
      zstrcpy( sz, "LOD " );
      zstrcat( sz, szLOD_Name );
      zstrcat( sz, " not found.  Possibly wrong LPLR?" );
      OperatorPrompt( vSubtask, "ZeidonEditor", sz, 0, 0, 1, zICON_STOP );
      return( zCALL_ERROR );
   }

   nRC = ActivateMetaOI( vSubtask, &vLOD, vList, zREFER_LOD_META,
                         zSINGLE | zLEVEL_APPLICATION );
   DropView( vList );

   // Copy Entity and Attribute names from LOD to vEdWrk.
   nRC = SetCursorFirstEntity( vLOD, "LOD_Entity", "" );
   while ( nRC == zCURSOR_SET )
   {
      CreateEntity( vEdWrk, "Entity", zPOS_LAST );
      SetAttributeFromAttribute( vEdWrk, "Entity", "EntityName",
                                 vLOD, "LOD_Entity", "IndentName" );

      nRC = SetCursorFirstEntity( vLOD, "LOD_Attribute", "" );
      while ( nRC == zCURSOR_SET )
      {
         CreateEntity( vEdWrk, "Attribute", zPOS_LAST );
         SetAttributeFromAttribute( vEdWrk, "Attribute", "AttributeName",
                                    vLOD, "ER_Attribute", "Name" );

         nRC = SetCursorNextEntity( vLOD, "LOD_Attribute", "" );
      }

      nRC = SetCursorNextEntity( vLOD, "LOD_Entity", "" );
   }

   DropMetaOI( vSubtask, vLOD );
   nRC = SetCursorFirstEntity( vEdWrk, "Entity", "" );
   SetSelectStateOfEntity( vEdWrk, "Entity", 1 );

   if ( CheckExistenceOfEntity( vEdWrk, "Attribute" ) >= zCURSOR_SET )
      SetSelectStateOfEntity( vEdWrk, "Attribute", 1 );

   AEQ_RefreshAEQ( vSubtask );

   return( 0 );

} // AEQ_SelectView
コード例 #14
0
ファイル: tzogsrco.c プロジェクト: arksoftgit/10c
//:   VIEW OldOperGrp  BASED ON LOD TZOGSRCO
zOPER_EXPORT zSHORT OPERATION
oTZOGSRCO_GlobalOperGrpMigrate( zVIEW     NewOperGrp,
                                zPCHAR    OperGroupMetaName,
                                zVIEW     SourceLPLR,
                                zVIEW     vSubtask )
{
   zVIEW     OldOperGrp = 0; 
   //:VIEW CurrentLPLR BASED ON LOD TZCMLPLO
   zVIEW     CurrentLPLR = 0; 

   //:STRING ( 513 ) SourceFileName                    // size according to zMAX_FILESPEC+1
   zCHAR     SourceFileName[ 514 ] = { 0 }; 
   //:STRING ( 513 ) SourceFileName2                   // size according to zMAX_FILESPEC+1
   zCHAR     SourceFileName2[ 514 ] = { 0 }; 
   //:STRING ( 36 ) SourceName
   zCHAR     SourceName[ 37 ] = { 0 }; 
   zSHORT    lTempInteger_0; 
   zSHORT    RESULT; 
   zCHAR     szTempString_0[ 33 ]; 


   //:// Activate existing source meta OldOperGroup
   //:SourceFileName = SourceLPLR.LPLR.MetaSrcDir + "\" + OperGroupMetaName + ".POG"
   GetStringFromAttribute( SourceFileName, SourceLPLR, "LPLR", "MetaSrcDir" );
   ZeidonStringConcat( SourceFileName, 1, 0, "\\", 1, 0, 514 );
   ZeidonStringConcat( SourceFileName, 1, 0, OperGroupMetaName, 1, 0, 514 );
   ZeidonStringConcat( SourceFileName, 1, 0, ".POG", 1, 0, 514 );
   //:// zIGNORE_ATTRIB_ERRORS=8192
   //:ActivateOI_FromFile( OldOperGrp, "TZOGSRCO", SourceLPLR,
   //:                     SourceFileName, zSINGLE + 8192 )
   ActivateOI_FromFile( &OldOperGrp, "TZOGSRCO", SourceLPLR, SourceFileName, zSINGLE + 8192 );
   //:NAME VIEW OldOperGrp "OldOperGrp"
   SetNameForView( OldOperGrp, "OldOperGrp", 0, zLEVEL_TASK );
   //://ActivateEmptyMetaOI( vSubtask, NewOperGrp, 14, zSINGLE ) // 14 is zSOURCE_GOPGRP_META
   //://NAME VIEW NewOperGrp "NewOperGrp"

   //:IF NewOperGrp.GlobalOperationGroup DOES NOT EXIST
   lTempInteger_0 = CheckExistenceOfEntity( NewOperGrp, "GlobalOperationGroup" );
   if ( lTempInteger_0 != 0 )
   { 

      //:// The Global Operation Group does not exist in the target, so simply copy everything over.

      //:CreateMetaEntity( vSubtask, NewOperGrp, "GlobalOperationGroup", zPOS_AFTER )
      CreateMetaEntity( vSubtask, NewOperGrp, "GlobalOperationGroup", zPOS_AFTER );
      //:SetMatchingAttributesByName( NewOperGrp, "GlobalOperationGroup", OldOperGrp, "GlobalOperationGroup", zSET_NULL )
      SetMatchingAttributesByName( NewOperGrp, "GlobalOperationGroup", OldOperGrp, "GlobalOperationGroup", zSET_NULL );

      //:// Copy over the source file to the new LPLR directory, if there is a source file.
      //:// We will assume a source file exists if the SourceFile.Extension is not null.  If there
      //:// is actually no source file, the CopyFile does no harm.
      //:IF OldOperGrp.GlobalOperationGroup.Extension != ""
      if ( CompareAttributeToString( OldOperGrp, "GlobalOperationGroup", "Extension", "" ) != 0 )
      { 
         //:RetrieveViewForMetaList( vSubtask, CurrentLPLR, zSOURCE_ERD_META ) // Get view for directory info.
         RetrieveViewForMetaList( vSubtask, &CurrentLPLR, zSOURCE_ERD_META );
         //:ResetViewFromSubobject( CurrentLPLR )
         ResetViewFromSubobject( CurrentLPLR );
         //:IF OldOperGrp.GlobalOperationGroup.Extension = "C"
         if ( CompareAttributeToString( OldOperGrp, "GlobalOperationGroup", "Extension", "C" ) == 0 )
         { 
            //:SourceName = OperGroupMetaName + ".C"
            ZeidonStringCopy( SourceName, 1, 0, OperGroupMetaName, 1, 0, 37 );
            ZeidonStringConcat( SourceName, 1, 0, ".C", 1, 0, 37 );
            //:ELSE
         } 
         else
         { 
            //:SourceName = OperGroupMetaName + ".VML"
            ZeidonStringCopy( SourceName, 1, 0, OperGroupMetaName, 1, 0, 37 );
            ZeidonStringConcat( SourceName, 1, 0, ".VML", 1, 0, 37 );
         } 

         //:END
         //:SourceFileName = SourceLPLR.LPLR.PgmSrcDir + "\" + SourceName
         GetStringFromAttribute( SourceFileName, SourceLPLR, "LPLR", "PgmSrcDir" );
         ZeidonStringConcat( SourceFileName, 1, 0, "\\", 1, 0, 514 );
         ZeidonStringConcat( SourceFileName, 1, 0, SourceName, 1, 0, 514 );
         //:SourceFileName2 = CurrentLPLR.LPLR.PgmSrcDir + "\" + SourceName
         GetStringFromAttribute( SourceFileName2, CurrentLPLR, "LPLR", "PgmSrcDir" );
         ZeidonStringConcat( SourceFileName2, 1, 0, "\\", 1, 0, 514 );
         ZeidonStringConcat( SourceFileName2, 1, 0, SourceName, 1, 0, 514 );
         //:SysCopyFile( vSubtask, SourceFileName, SourceFileName2, TRUE )
         SysCopyFile( vSubtask, SourceFileName, SourceFileName2, TRUE );
         //:DropMetaOI( vSubtask, CurrentLPLR )
         DropMetaOI( vSubtask, CurrentLPLR );
      } 

      //:END

      //:FOR EACH OldOperGrp.Operation
      RESULT = SetCursorFirstEntity( OldOperGrp, "Operation", "" );
      while ( RESULT > zCURSOR_UNCHANGED )
      { 

         //:CreateMetaEntity( vSubtask, NewOperGrp, "Operation", zPOS_AFTER )
         CreateMetaEntity( vSubtask, NewOperGrp, "Operation", zPOS_AFTER );
         //:SetMatchingAttributesByName ( NewOperGrp, "Operation", OldOperGrp,
         //:                              "Operation", zSET_NULL )
         SetMatchingAttributesByName( NewOperGrp, "Operation", OldOperGrp, "Operation", zSET_NULL );

         //:FOR EACH OldOperGrp.Parameter
         RESULT = SetCursorFirstEntity( OldOperGrp, "Parameter", "" );
         while ( RESULT > zCURSOR_UNCHANGED )
         { 
            //:// Make sure the ShortDesc in the Parameter is not null.
            //:IF OldOperGrp.Parameter.ShortDesc = ""
            if ( CompareAttributeToString( OldOperGrp, "Parameter", "ShortDesc", "" ) == 0 )
            { 
               //:OldOperGrp.Parameter.ShortDesc = "Parm"
               SetAttributeFromString( OldOperGrp, "Parameter", "ShortDesc", "Parm" );
            } 

            //:END
            //:CreateMetaEntity( vSubtask, NewOperGrp, "Parameter", zPOS_AFTER )
            CreateMetaEntity( vSubtask, NewOperGrp, "Parameter", zPOS_AFTER );
            //:SetMatchingAttributesByName( NewOperGrp, "Parameter", OldOperGrp,
            //:                             "Parameter", zSET_NULL )
            SetMatchingAttributesByName( NewOperGrp, "Parameter", OldOperGrp, "Parameter", zSET_NULL );
            RESULT = SetCursorNextEntity( OldOperGrp, "Parameter", "" );
         } 

         RESULT = SetCursorNextEntity( OldOperGrp, "Operation", "" );
         //:END
      } 


      //:END

      //:ELSE
   } 
   else
   { 

      //:// The Global Operation Group exists in the target, so merge in any new Operations.
      //:// We will force over any Operations (both prototype and code) for any Operations not flagged as modified in target LPLR.

      //:FOR EACH OldOperGrp.Operation
      RESULT = SetCursorFirstEntity( OldOperGrp, "Operation", "" );
      while ( RESULT > zCURSOR_UNCHANGED )
      { 

         //:SET CURSOR FIRST NewOperGrp.Operation WHERE NewOperGrp.Operation.Name = OldOperGrp.Operation.Name
         GetStringFromAttribute( szTempString_0, OldOperGrp, "Operation", "Name" );
         RESULT = SetCursorFirstEntityByString( NewOperGrp, "Operation", "Name", szTempString_0, "" );
         //:IF RESULT < zCURSOR_SET
         if ( RESULT < zCURSOR_SET )
         { 
            //:CreateMetaEntity( vSubtask, NewOperGrp, "Operation", zPOS_AFTER )
            CreateMetaEntity( vSubtask, NewOperGrp, "Operation", zPOS_AFTER );
            //:SetMatchingAttributesByName ( NewOperGrp, "Operation", OldOperGrp, "Operation", zSET_NULL )
            SetMatchingAttributesByName( NewOperGrp, "Operation", OldOperGrp, "Operation", zSET_NULL );
         } 

         //:END

         //:// If the operation is new or modifiable, set new parameters and operation code.
         //:IF NewOperGrp.Operation.DoNotMergeFlag = ""
         if ( CompareAttributeToString( NewOperGrp, "Operation", "DoNotMergeFlag", "" ) == 0 )
         { 
            //:FOR EACH NewOperGrp.Parameter
            RESULT = SetCursorFirstEntity( NewOperGrp, "Parameter", "" );
            while ( RESULT > zCURSOR_UNCHANGED )
            { 
               //:DELETE ENTITY NewOperGrp.Parameter NONE
               RESULT = DeleteEntity( NewOperGrp, "Parameter", zREPOS_NONE );
               RESULT = SetCursorNextEntity( NewOperGrp, "Parameter", "" );
            } 

            //:END
            //:FOR EACH OldOperGrp.Parameter
            RESULT = SetCursorFirstEntity( OldOperGrp, "Parameter", "" );
            while ( RESULT > zCURSOR_UNCHANGED )
            { 
               //:// Make sure the ShortDesc in the Parameter is not null.
               //:IF OldOperGrp.Parameter.ShortDesc = ""
               if ( CompareAttributeToString( OldOperGrp, "Parameter", "ShortDesc", "" ) == 0 )
               { 
                  //:OldOperGrp.Parameter.ShortDesc = "Parm"
                  SetAttributeFromString( OldOperGrp, "Parameter", "ShortDesc", "Parm" );
               } 

               //:END
               //:CreateMetaEntity( vSubtask, NewOperGrp, "Parameter", zPOS_AFTER )
               CreateMetaEntity( vSubtask, NewOperGrp, "Parameter", zPOS_AFTER );
               //:SetMatchingAttributesByName( NewOperGrp, "Parameter", OldOperGrp, "Parameter", zSET_NULL )
               SetMatchingAttributesByName( NewOperGrp, "Parameter", OldOperGrp, "Parameter", zSET_NULL );
               RESULT = SetCursorNextEntity( OldOperGrp, "Parameter", "" );
            } 

            //:END
         } 

         RESULT = SetCursorNextEntity( OldOperGrp, "Operation", "" );

         //:   // Add new Operation Code.
         //:   // CopyOperationCode

         //:END
      } 


      //:END
   } 


   //:END



   //:DropObjectInstance( OldOperGrp )
   DropObjectInstance( OldOperGrp );
   //:CommitMetaOI( vSubtask, NewOperGrp, 14 )   // 14 is zSOURCE_GOPGRP_META
   CommitMetaOI( vSubtask, NewOperGrp, 14 );

   //:// Build the prototypes in zeidon.h file.
   //:RetrieveViewForMetaList( vSubtask, CurrentLPLR, zSOURCE_GOPGRP_META ) // Get view for Merge oper.
   RetrieveViewForMetaList( vSubtask, &CurrentLPLR, zSOURCE_GOPGRP_META );
   //:ResetViewFromSubobject( CurrentLPLR )
   ResetViewFromSubobject( CurrentLPLR );
   //:MergeGlobalPrototypes( NewOperGrp,
   //:                       NewOperGrp.GlobalOperationGroup.Name,
   //:                       "GlobalOperationGroup",
   //:                       CurrentLPLR )
   GetStringFromAttribute( szTempString_0, NewOperGrp, "GlobalOperationGroup", "Name" );
   MergeGlobalPrototypes( NewOperGrp, szTempString_0, "GlobalOperationGroup", CurrentLPLR );
   //:DropMetaOI( vSubtask, CurrentLPLR )
   DropMetaOI( vSubtask, CurrentLPLR );
   return( 0 );
// END
}