source: trunk/src/fortran/RpUtilsFInterface.cc @ 656

Last change on this file since 656 was 656, checked in by dkearney, 14 years ago

added progress function for c, c++ and fortran, so people dont have to generate the cryptic progress string themselves to get a progress bar in the gui.

File size: 1.2 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  INTERFACE: Fortran Rappture Utils Source
4 *
5 * ======================================================================
6 *  AUTHOR:  Derrick Kearney, Purdue University
7 *  Copyright (c) 2004-2007  Purdue Research Foundation
8 *
9 *  See the file "license.terms" for information on usage and
10 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 * ======================================================================
12 */
13
14#include "RpUtils.h"
15#include "RpUtilsFInterface.h"
16#include "RpUtilsFStubs.c"
17#include "RpFortranCommon.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/**********************************************************************/
24// FUNCTION: rp_progress(int percent, const char* text, int text_len)
25/// Report the progress of the application.
26/**
27 */
28
29int rp_progress(int* percent, char* text, int text_len)
30{
31    int retVal = 1;
32    const char* inText = NULL;
33    inText = null_terminate(text, text_len);
34    if (inText != NULL) {
35        retVal = Rappture::progress(*percent,inText);
36        free((void*)inText);
37    }
38    return retVal;
39}
40
41#ifdef __cplusplus
42}
43#endif
Note: See TracBrowser for help on using the repository browser.