Merge remote-tracking branch 'origin/master' into YaSp
[scilab.git] / scilab / modules / scicos_blocks / src / c / cscope.c
index 8081400..50859f1 100644 (file)
@@ -252,8 +252,10 @@ SCICOS_BLOCKS_IMPEXP void cscope(scicos_block * block, scicos_flag flag)
             sco = reallocHistoryBuffer(block, sco->internal.maxNumberOfPoints + sco->internal.numberOfPoints);
             sco->scope.disableBufferUpdate = FALSE;
             sco->scope.historyUpdateCounter = 0;
+#ifdef WITH_GUI
             pushHistory(block, 0, sco->internal.maxNumberOfPoints);
             deleteBufferPolylines(block);
+#endif
             freeScoData(block);
             break;
 
@@ -691,6 +693,7 @@ static void setFigureSettings(int iFigureUID, scicos_block * block)
 
 static int getFigure(scicos_block * block)
 {
+#ifdef WITH_GUI
     signed int figNum;
     int iFigureUID = 0;
     int iAxe = 0;
@@ -761,6 +764,10 @@ static int getFigure(scicos_block * block)
         sco->scope.cachedFigureUID = iFigureUID;
     }
     return iFigureUID;
+#else
+    Coserror("%s: Scilab is compiled without GUI, can not use Scope.", "cscope");
+    return 0;
+#endif
 }
 
 static int getAxe(int iFigureUID, scicos_block * block, int input)