/*___INFO__MARK_BEGIN__*/ /************************************************************************* * * The Contents of this file are made available subject to the terms of * the Sun Industry Standards Source License Version 1.2 * * Sun Microsystems Inc., March, 2001 * * * Sun Industry Standards Source License Version 1.2 * ================================================= * The contents of this file are subject to the Sun Industry Standards * Source License Version 1.2 (the "License"); You may not use this file * except in compliance with the License. You may obtain a copy of the * License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html * * Software provided under this License is provided on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. * See the License for the specific provisions governing your rights and * obligations concerning the Software. * * The Initial Developer of the Original Code is: Sun Microsystems, Inc. * * Copyright: 2001 by Sun Microsystems, Inc. * * All Rights Reserved. * ************************************************************************/ /*___INFO__MARK_END__*/ #include #include #include #include "gdi/sge_gdi.h" #include "sge_str.h" #include "sge_centry.h" #include "qmon_rmon.h" #include "qmon_matrix.h" #include "qmon_load.h" #include "qmon_comm.h" #include "qmon_message.h" #include "qmon_util.h" typedef struct _tFFM { Widget matrix; Widget name; Widget value; } tFFM; /*-------------------------------------------------------------------------*/ static void qmonLoadAddEntry(Widget matrix, String name); /*-------------------------------------------------------------------------*/ void qmonLoadSelectEntry(Widget w, XtPointer cld, XtPointer cad) { XbaeMatrixSelectCellCallbackStruct *cbs = (XbaeMatrixSelectCellCallbackStruct*) cad; String str; DENTER(GUI_LAYER, "qmonLoadSelectEntry"); if (cbs->num_params && !strcmp(cbs->params[0], "begin")) { /* name */ str = XbaeMatrixGetCell(w, cbs->row, 0); /* value */ str = XbaeMatrixGetCell(w, cbs->row, 1); } DEXIT; } /*-------------------------------------------------------------------------*/ static void qmonLoadAddEntry( Widget matrix, String name ) { int rows = 0; int row; String str; String new_row[2]; DENTER(GUI_LAYER, "qmonLoadAddEntry"); /* ** check input */ if (is_empty_word(name)) { qmonMessageShow(matrix, True, "Name required !"); DEXIT; return; } /* ** add to attribute matrix, search if item already exists */ rows = XbaeMatrixNumRows(matrix); for (row=0; row0) { lPSortList(entries, "%I+", CE_name); strs = (String*)XtMalloc(sizeof(String)*n); for (ep=lFirst(entries), i=0; i