Changeset 2801 in Sophya for trunk/SophyaPI/ProgPI/w2ps.cc


Ignore:
Timestamp:
Jun 8, 2005, 5:45:04 PM (20 years ago)
Author:
ansari
Message:

Synchronisation multithread pour les commandes de sortie postscript - Reza 8 Juin 2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/ProgPI/w2ps.cc

    r2615 r2801  
    125125    return(0);
    126126  }
     127  sapp->CkEvt_LockMutex();
    127128  if (sapp->CurrentWindow() == NULL) {
     129    sapp->UnlockMutex();
    128130    cout << " W2PSModuleExecutor::Execute() No current window !" << endl;
    129131    return(0);
     
    137139  else if (kw == "w2eps") {
    138140    if (tokens.size() < 1) {
     141      sapp->UnlockMutex();
    139142      cout << "Usage: w2eps EPSFileName" << endl;
    140143      return(0);
     
    144147    cout << " w2eps: Current window to EPS file " << tokens[0] << endl;
    145148  }
     149  sapp->UnlockMutex();
    146150}
    147151else if ( (kw == "imagcmap2ps") || (kw == "imagcmap2eps") ) {
     
    152156  }
    153157  PIImage* curpimg = NULL;
     158  sapp->CkEvt_LockMutex();
    154159  if (sapp->CurrentBaseWdg())
    155160    curpimg = dynamic_cast<PIImage *>(sapp->CurrentBaseWdg());
    156161  if (curpimg == NULL) {
     162    sapp->UnlockMutex();
    157163    cout << " W2PSModuleExecutor::Execute() No current PIImage !" << endl;
    158164    return(0);
     
    168174  else if (kw == "imagcmap2eps") {
    169175    if (tokens.size() < 1) {
     176      sapp->UnlockMutex();
    170177      cout << "Usage: imagcmap2eps EPSFileName" << endl;
    171178      return(0);
     
    184191                          sx/(double)sapp->CMapVW()->XSize(), 1.);
    185192
     193  sapp->UnlockMutex();
    186194  if (cepsf) delete cepsf;
    187195}
Note: See TracChangeset for help on using the changeset viewer.