// ---------------------------------------------------------------------------- // // $Id$ // // Copyright 2008, 2009, 2010, 2011, 2012 Antonio Franchi and Paolo Stegagno // // This file is part of MIP. // // MIP is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // MIP is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with MIP. If not, see <http://www.gnu.org/licenses/>. // // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it // // ---------------------------------------------------------------------------- #include "FifoTerm.h" char message[40]="la gatta sul tetto che scotta\n"; char myMessage[40]="la gotta sul ceppo che scappa\n"; int main(int argc, char *argv[]) { char title[20]; sprintf(title,"fifoServerMio\0"); { FifoTerm f(title); sleep(2); for(int i=1000;i>0;i--){ sprintf(myMessage,"%d %s",rand(),message); f.lineErase(); f.print(myMessage); if(i%10==5)f.flush(); usleep(10000); } } printf("done\n"); getchar(); }