#include "fpreproc/byte_declare.h"

C        1         2         3         4         5         6         7         8
C  character arguments are null terminated

      integer function ef_initialize()

      implicit none

      integer       efc_initialize

C     write(*,*) ' In ef_initialize: '

      ef_initialize = efc_initialize()

      return
      end


C--------------------------------------------------------------------
      integer function ef_end()

      implicit none

      integer efc_end

      ef_end = efc_end()

      return
      end

C--------------------------------------------------------------------
      integer function ef_transpmonitor(mon)

      implicit none

      integer mon
      integer efc_transpmonitor

      ef_transpmonitor = efc_transpmonitor(mon)

      return
      end


C--------------------------------------------------------------------
      integer function ef_register(application, host, user, id, collect)

      implicit none

      character*(*) application
      character*(*) host
      character*(*) user
      character*(*) id
      integer collect

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100), buf2(100), buf3(100)
      integer       str_length
      integer       efc_register


      ilb = str_length(application)
      call cstring(application(1:ilb), buf0, '2C')

      ilb = str_length(host)
      call cstring(host(1:ilb), buf1, '2C')

      ilb = str_length(user)
      call cstring(user(1:ilb), buf2, '2C')

      ilb = str_length(id)
      call cstring(id(1:ilb), buf3, '2C')

      ef_register = efc_register(buf0, buf1, buf2, buf3, collect)
C     write(*,*) ' In ef_register: ', collect

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphwindowcreate(gw,rows,columns)

      implicit none

      character*(*) gw
      integer       rows
      integer       columns

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphwindowcreate

C     write(*,*) ' In ef_graphwindowcreate: '
C     write(*,*) rows
C     write(*,*) columns

      ilb = str_length(gw)
      call cstring(gw(1:ilb), buf0, '2C')

      ef_graphwindowcreate = efc_graphwindowcreate(buf0, rows, columns)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphcreate(graphname,type)

      implicit none

      character*(*) graphname
      integer       type

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphcreate

C     write(*,*) ' In ef_graphcreate: ', type

      ilb = str_length(graphname)
      call cstring(graphname(1:ilb), buf0, '2C')

      ef_graphcreate = efc_graphcreate(buf0, type)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphwindowaddgraph(gw,graphname,row,column)

      implicit none

      character*(*) gw
      character*(*) graphname
      integer       row
      integer       column

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100)
      integer       str_length
      integer       efc_graphwindowaddgraph

C     write(*,*) ' In ef_graphwindowaddgraph: '

      ilb = str_length(gw)
      call cstring(gw(1:ilb), buf0, '2C')

      ilb = str_length(graphname)
      call cstring(graphname(1:ilb), buf1, '2C')

      ef_graphwindowaddgraph = efc_graphwindowaddgraph(buf0,buf1,row,
     >     	column)

      return
      end


C--------------------------------------------------------------------
      integer function ef_fxdatasetcreate(name, npts, x, fx)

      implicit none

      character*(*) name
      integer       npts
      real*8        x(npts)
      real*8        fx(npts)

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_fxdatasetcreate

C     write(*,*) 'In ef_fxdatasetcreate: '
C     write(*,*) name, npts

      ilb = str_length(name)
      call cstring(name(1:ilb), buf0, '2C')

      ef_fxdatasetcreate = efc_fxdatasetcreate(buf0, npts, x, fx)

      return
      end


C--------------------------------------------------------------------
      integer function ef_fxtdatasetcreate(name, npts, x, fx, time)

      implicit none

      character*(*) name
      integer       npts
      real*8        x(npts)
      real*8        fx(npts)
      real*8	    time

      integer       ilb, it
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_fxtdatasetcreate

C     write(*,*) 'In ef_fxtdatasetcreate: '
C     write(*,*) name, npts

      ilb = str_length(name)
      call cstring(name(1:ilb), buf0, '2C')

C     do it=1,npts
C         write (*,*) x(it), fx(it)
C     enddo

      ef_fxtdatasetcreate = efc_fxtdatasetcreate(buf0, npts, x,
     >      fx, time)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphaddfxdataset(graph, dataset)

      implicit none

      character*(*) graph
      character*(*) dataset

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100)
      integer       str_length
      integer       efc_graphaddfxdataset

C     write(*,*) 'In ef_graphaddfxdataset: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ilb = str_length(dataset)
      call cstring(dataset(1:ilb), buf1, '2C')

      ef_graphaddfxdataset = efc_graphaddfxdataset(buf0, buf1)

      return
      end

C--------------------------------------------------------------------
      integer function ef_graphaddfxdatasetid(graph, id)

      implicit none

      character*(*) graph
      integer       id

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100)
      integer       str_length
      integer       efc_graphaddfxdatasetid

C     write(*,*) 'In ef_graphaddfxdataset: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ef_graphaddfxdatasetid = efc_graphaddfxdatasetid(buf0, id)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphsetxaxis(graph, loglin)

      implicit none

      character*(*) graph
      integer loglin

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphsetxaxis

C     write(*,*) ' In ef_graphsetxaxis: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ef_graphsetxaxis = efc_graphsetxaxis(buf0, loglin)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphsetyaxis(graph, loglin)

      implicit none

      character*(*) graph
      integer loglin

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphsetyaxis

C     write(*,*) ' In ef_graphsetyaxis: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ef_graphsetyaxis = efc_graphsetyaxis(buf0, loglin)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphsetxrange(graph, xmin, xmax)

      implicit none

      character*(*) graph
      real*8 xmin, xmax

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphsetxrange

C     write(*,*) ' In ef_graphsetxrange: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ef_graphsetxrange = efc_graphsetxrange(buf0, xmin, xmax)

      return
      end

C--------------------------------------------------------------------
      integer function ef_graphsetyrange(graph, ymin, ymax)

      implicit none

      character*(*) graph
      real*8 ymin, ymax

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphsetyrange

C     write(*,*) ' In ef_graphsetyrange: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ef_graphsetyrange = efc_graphsetyrange(buf0, ymin, ymax)

      return
      end

C--------------------------------------------------------------------
      integer function ef_graphsetxlabel(graph, label)

      implicit none

      character*(*) graph
      character*(*) label

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100)
      integer       str_length
      integer       efc_graphsetxlabel

C     write(*,*) ' In ef_graphsetxlabel: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ilb = str_length(label)
      call cstring(label(1:ilb), buf1, '2C')

      ef_graphsetxlabel = efc_graphsetxlabel(buf0, buf1)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphsetylabel(graph, label)

      implicit none

      character*(*) graph
      character*(*) label

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100)
      integer       str_length
      integer       efc_graphsetylabel

C     write(*,*) ' In ef_graphsetylabel: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ilb = str_length(label)
      call cstring(label(1:ilb), buf1, '2C')

      ef_graphsetylabel = efc_graphsetylabel(buf0, buf1)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphsetindexlabel(graph, label)

      implicit none

      character*(*) graph
      character*(*) label

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100)
      integer       str_length
      integer       efc_graphsetindexlabel

C     write(*,*) ' In ef_graphsetindexlabel: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ilb = str_length(label)
      call cstring(label(1:ilb), buf1, '2C')

      ef_graphsetindexlabel = efc_graphsetindexlabel(buf0, buf1)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphsettitle(graph, title, shorttitle)

      implicit none

      character*(*) graph
      character*(*) title
      character*(*) shorttitle

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100), buf2(100)
      integer       str_length
      integer       efc_graphsettitle

C     write(*,*) ' In ef_graphsettitle: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ilb = str_length(title)
      call cstring(title(1:ilb), buf1, '2C')

      ilb = str_length(shorttitle)
      call cstring(shorttitle(1:ilb), buf2, '2C')

      ef_graphsettitle = efc_graphsettitle(buf0, buf1, buf2)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphwindowdisplay(gw)

      implicit none

      character*(*) gw

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphwindowdisplay

C     write(*,*) ' In ef_graphwindowdisplay: '

      ilb = str_length(gw)
      call cstring(gw(1:ilb), buf0, '2C')

      ef_graphwindowdisplay = efc_graphwindowdisplay(buf0)

      return
      end


C--------------------------------------------------------------------
      integer function ef_fxtdatasetdisplay(gw, graphname, setname)

      implicit none

      character*(*) gw
      character*(*) graphname
      character*(*) setname

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100), buf2(100)
      integer       str_length
      integer       efc_fxtdatasetdisplay

C     write(*,*) ' In ef_fxtdatasetdisplay: '

      ilb = str_length(gw)
      call cstring(gw(1:ilb), buf0, '2C')

      ilb = str_length(graphname)
      call cstring(graphname(1:ilb), buf1, '2C')

      ilb = str_length(setname)
      call cstring(setname(1:ilb), buf2, '2C')

      ef_fxtdatasetdisplay = efc_fxtdatasetdisplay(buf0, buf1, buf2)

      return
      end

C--------------------------------------------------------------------
      integer function ef_fxtdatasetdisplayid(gw, graphname, id)
                                                                                                 
      implicit none
                                                                                                 
      character*(*) gw
      character*(*) graphname
      integer       id
                                                                                                 
      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100)
      integer       str_length
      integer       efc_fxtdatasetdisplayid
                                                                                                 
C     write(*,*) ' In ef_fxtdatasetdisplayid: '
                                                                                                 
      ilb = str_length(gw)
      call cstring(gw(1:ilb), buf0, '2C')
                                                                                                 
      ilb = str_length(graphname)
      call cstring(graphname(1:ilb), buf1, '2C')
                                                                                                 
      ef_fxtdatasetdisplayid = efc_fxtdatasetdisplayid(buf0, buf1, id)
                                                                                                 
      return
      end


C--------------------------------------------------------------------
      integer function ef_graphshowlegend(graph, show)

      implicit none

      character*(*) graph
      integer       show

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphshowlegend

C     write(*,*) ' In ef_graphhshowlegend: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ef_graphshowlegend = efc_graphshowlegend(buf0, show)

      return
      end


C--------------------------------------------------------------------
      integer function ef_showlines(dataset, show)

      implicit none

      character*(*) dataset
      integer       show

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_showlines

C     write(*,*) ' In ef_showlines: '

      ilb = str_length(dataset)
      call cstring(dataset(1:ilb), buf0, '2C')

      ef_showlines = efc_showlines(buf0, show)

      return
      end


C--------------------------------------------------------------------
      integer function ef_showmarkers(dataset, show)

      implicit none

      character*(*) dataset
      integer       show

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_showmarkers

C     write(*,*) ' In ef_showmarkers: '

      ilb = str_length(dataset)
      call cstring(dataset(1:ilb), buf0, '2C')

      ef_showmarkers = efc_showmarkers(buf0, show)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphaddlegendtitle(graph, title)

      implicit none

      character*(*) graph
      character*(*) title

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100)
      integer       str_length
      integer       efc_graphaddlegendtitle

C     write(*,*) 'In ef_graphaddlegendtitle: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ilb = str_length(title)
      call cstring(title(1:ilb), buf1, '2C')
C     write(*,*) '  In ef_graphaddlegendtitle: ', buf0, buf1

      ef_graphaddlegendtitle = efc_graphaddlegendtitle(buf0, buf1)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphsetplotarea(graphname, location, width,
     >    height)

      implicit none

      character*(*) graphname
      real*8        location(2)
      real*8        width
      real*8        height

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphsetplotarea

C     write(*,*) ' In ef_graphsetplotarea: '

      ilb = str_length(graphname)
      call cstring(graphname(1:ilb), buf0, '2C')

      ef_graphsetplotarea = efc_graphsetplotarea(buf0, location, width,
     >   height)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphaddlabel(graph, label, location, font,
     >    style, height, color)

      implicit none

      character*(*) graph
      character*(*) label
      real*8        location(2)
      character*(*) font
      character*(*) style
      real*8        height
      character*(*) color

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100), buf2(100), buf3(100)
      BYTE_DECLARE  buf4(100)
      integer       str_length
      integer       efc_graphaddlabel

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ilb = str_length(label)
      call cstring(label(1:ilb), buf1, '2C')

      ilb = str_length(font)
      call cstring(font(1:ilb), buf2, '2C')

      ilb = str_length(style)
      call cstring(style(1:ilb), buf3, '2C')

      ilb = str_length(color)
      call cstring(color(1:ilb), buf4, '2C')

      ef_graphaddlabel = efc_graphaddlabel(buf0, buf1, location, buf2,
     >   buf3, height, buf4)

      return
      end


C--------------------------------------------------------------------
      integer function ef_free()

      implicit none

      integer       efc_free

C     write(*,*) ' In ef_free: '

      ef_free = efc_free()

      return
      end


C--------------------------------------------------------------------
      integer function ef_closewindows()

      implicit none

      integer   efc_closewindows

C     write(*,*) ' In ef_closewindows: '

      ef_closewindows = efc_closewindows()

      return
      end


C--------------------------------------------------------------------
      integer function ef_surfacecreate(surfacename, graphname)

      implicit none

      character*(*) surfacename
      character*(*) graphname

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100)
      integer       str_length
      integer       efc_surfacecreate

C     write(*,*) ' In ef_surfacecreate: '

      ilb = str_length(surfacename)
      call cstring(surfacename(1:ilb), buf0, '2C')

      ilb = str_length(graphname)
      call cstring(graphname(1:ilb), buf1, '2C')

      ef_surfacecreate = efc_surfacecreate(buf0, buf1)

      return
      end


C--------------------------------------------------------------------
      integer function ef_surfacesettitle(graph, title)

      implicit none

      character*(*) graph
      character*(*) title
      integer ef_graphsettitle

      ef_surfacesettitle = ef_graphsettitle(graph, title, ' ')

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphwindowaddsurface(gw,graphname,row,column)

      implicit none

      character*(*) gw
      character*(*) graphname
      integer       row
      integer       column
      integer	    ef_graphwindowaddgraph

      ef_graphwindowaddsurface = ef_graphwindowaddgraph(gw, graphname,
     >	 row, column)
      return
      end


C--------------------------------------------------------------------
      integer function ef_datasetaddpoints(gw,graphname,setname,npoints,
     >   x, fx)

      implicit none

      character*(*) gw
      character*(*) graphname
      character*(*) setname
      integer       npoints
      real*8        x(npoints)
      real*8        fx(npoints)

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100), buf2(100)
      integer       str_length
      integer       efc_datasetaddpoints

C     write(*,*) ' In ef_datasetaddpoints: '
C     write(*,*) npoints

      ilb = str_length(gw)
      call cstring(gw(1:ilb), buf0, '2C')

      ilb = str_length(graphname)
      call cstring(graphname(1:ilb), buf1, '2C')

      ilb = str_length(setname)
      call cstring(setname(1:ilb), buf2, '2C')

      ef_datasetaddpoints = efc_datasetaddpoints(buf0, buf1, buf2,
     >   npoints, x, fx);

      return
      end


C--------------------------------------------------------------------
      integer function ef_fxycreate(name, nx, ny, xy, xcoords, ycoords)

      implicit none

      character*(*) name
      integer       nx, ny
      real*8        xy(nx, ny)
      real*8        xcoords(nx), ycoords(ny)

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_fxycreate
      integer       i, j

C     write(*,*) 'In ef_fxycreate: '
C     write(*,*) name, nx, ny

C     do i=1,nx
C	do j=1,ny
C   	   write(*,*) xy(i,j)
C	enddo
C     enddo

      ilb = str_length(name)
      call cstring(name(1:ilb), buf0, '2C')

      ef_fxycreate = efc_fxycreate(buf0, nx, ny, xy, xcoords, ycoords)

      return
      end


C--------------------------------------------------------------------
      integer function ef_fxysetcontour(name, ncontours, contours)

      implicit none

      character*(*) name
      integer       ncontours
      real*8        contours(ncontours)

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_fxysetcontour

C     write(*,*) 'In ef_fxysetcontour: '
C     write(*,*) name, ncontours

      ilb = str_length(name)
      call cstring(name(1:ilb), buf0, '2C')

      ef_fxysetcontour = efc_fxysetcontour(buf0, ncontours, contours)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphaddfxy(graph, dataset)

      implicit none

      character*(*) graph
      character*(*) dataset

      integer       ilb
      BYTE_DECLARE  buf0(100), buf1(100)
      integer       str_length
      integer       efc_graphaddfxy

C     write(*,*) 'In ef_graphaddfxy: '

      ilb = str_length(graph)
      call cstring(graph(1:ilb), buf0, '2C')

      ilb = str_length(dataset)
      call cstring(dataset(1:ilb), buf1, '2C')

      ef_graphaddfxy = efc_graphaddfxy(buf0, buf1)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphwindowcreatefile(gwfile)

      implicit none

      character*(*) gwfile

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphwindowcreatefile

C     write(*,*) ' In ef_graphwindowcreatefile: '

      ilb = str_length(gwfile)
      call cstring(gwfile(1:ilb), buf0, '2C')

      ef_graphwindowcreatefile = efc_graphwindowcreatefile(buf0)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphwindowappendfile(gwfile)

      implicit none

      character*(*) gwfile

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphwindowappendfile

C     write(*,*) ' In ef_graphwindowappendfile: '

      ilb = str_length(gwfile)
      call cstring(gwfile(1:ilb), buf0, '2C')

      ef_graphwindowappendfile = efc_graphwindowappendfile(buf0)

      return
      end


C--------------------------------------------------------------------
      integer function ef_graphwindowclosefile(gwfile, poll)

      implicit none

      character*(*) gwfile
      integer 	    poll

      integer       ilb
      BYTE_DECLARE  buf0(100)
      integer       str_length
      integer       efc_graphwindowclosefile

C     write(*,*) ' In ef_graphwindowclosefile: ', poll

      ilb = str_length(gwfile)
      call cstring(gwfile(1:ilb), buf0, '2C')

      ef_graphwindowclosefile = efc_graphwindowclosefile(buf0, poll)

      return
      end

C-------------------------------------------------------------------
      integer function ef_sendfile(filename)
      implicit none
            
      character*(*) filename
      
      integer ilb
      BYTE_DECLARE buf0(100)
      integer str_length
      integer efc_sendfile

      ilb = str_length(filename)
      call cstring(filename(1:ilb), buf0, '2C')

      ef_sendfile = efc_sendfile(buf0)
      
      return
      end

C-------------------------------------------------------------------
      integer function ef_tablecreate(tablename)
      implicit none
      
      character*(*) tablename
      
      integer ilb
      BYTE_DECLARE buf0(100)
      integer str_length
      integer efc_tablecreate
      
      ilb = str_length(tablename)
      call cstring(tablename(1:ilb), buf0, '2C')
      
      ef_tablecreate = efc_tablecreate(buf0)
      
      return
      end
      
C-------------------------------------------------------------------
      integer function ef_tableaddcolumn(tablename, colname)
      implicit none
      
      character*(*) tablename
      character*(*) colname
      
      integer ilb
      BYTE_DECLARE buf0(100), buf1(100)
      integer str_length
      integer efc_tableaddcolumn
      
      ilb = str_length(tablename)
      call cstring(tablename(1:ilb), buf0, '2C')
      ilb = str_length(colname)
      call cstring(colname(1:ilb), buf1, '2C')
      
      ef_tableaddcolumn = efc_tableaddcolumn(buf0, buf1)
      
      return
      end
      
C-------------------------------------------------------------------
      integer function ef_tableaddcolumnid(tablename, id)
      implicit none
      
      character*(*) tablename
      integer id
      
      integer ilb
      BYTE_DECLARE buf0(100)
      integer str_length
      integer efc_tableaddcolumnid
      
      ilb = str_length(tablename)
      call cstring(tablename(1:ilb), buf0, '2C')
      
      ef_tableaddcolumnid = efc_tableaddcolumnid(buf0, id)
      
      return
      end
      
C-------------------------------------------------------------------
      integer function ef_columncreate(colname, ncells, cells)
      implicit none
      
      character*(*) colname
      integer ncells
      character*(*) cells(ncells)
      
      integer ilb, istr, idstr
      BYTE_DECLARE buf0(100), buf1(100)
      integer str_length
      integer str_width
      integer efc_columncreateblank
      integer efc_columnaddrow
      
      str_width = len(cells)
      
      ilb = str_length(colname)
      call cstring(colname(1:ilb), buf0, '2C')

      ef_columncreate = efc_columncreateblank(buf0)

      do istr = 1, ncells
           idstr = str_length(cells(istr))
           call cstring(cells(istr)(1:idstr), buf1, '2C')
           ef_columncreate = efc_columnaddrow(buf0, buf1)
      enddo
      
      return
      end

C-------------------------------------------------------------------
      integer function ef_columnaddrows(colname, ncells, cells)
      implicit none
      character*(*) colname
      integer ncells
      character*(*) cells(ncells)
      
      integer ilb, istr, idstr
      BYTE_DECLARE buf0(100), buf1(100)
      integer str_length
      integer str_width
      integer efc_columnaddrow
      
      str_width = len(cells)
      
      ilb = str_length(colname)
      call cstring(colname(1:ilb), buf0, '2C')
      
      do istr = 1, ncells
      	idstr = str_length(cells(istr))
      	call cstring(cells(istr)(1:idstr), buf1, '2C')
      	ef_columnaddrows = efc_columnaddrow(buf0, buf1)
      enddo
      
      return
      end
      
C-------------------------------------------------------------------
      integer function ef_graphwindowaddtable(windowname, tablename,
     $     row, column)
      implicit none
      
      character*(*) windowname
      character*(*) tablename
      integer row
      integer column
      
      integer ilb
      BYTE_DECLARE buf0(100), buf1(100)
      integer str_length
      integer efc_graphwindowaddtable
      
      ilb = str_length(windowname)
      call cstring(windowname(1:ilb), buf0, '2C')
      
      ilb = str_length(tablename)
      call cstring(tablename(1:ilb), buf1, '2C')
      
      ef_graphwindowaddtable = efc_graphwindowaddtable(buf0, buf1,
     $     row, column)
      
      return
      end

C-------------------------------------------------------------------
      integer function ef_graphsetxgrid(graphname, grid)
      implicit none

      character*(*) graphname
      integer grid

      integer ilb
      BYTE_DECLARE buf0(100)
      integer str_length
      integer efc_graphsetxgrid

      ilb = str_length(graphname)
      call cstring(graphname(1:ilb), buf0, '2C')

      ef_graphsetxgrid = efc_graphsetxgrid(buf0, grid)

      return
      end

C-------------------------------------------------------------------
      integer function ef_graphsetygrid(graphname, grid)
      implicit none

      character*(*) graphname
      integer grid

      integer ilb
      BYTE_DECLARE buf0(100)
      integer str_length
      integer efc_graphsetygrid

      ilb = str_length(graphname)
      call cstring(graphname(1:ilb), buf0, '2C')

      ef_graphsetygrid = efc_graphsetygrid(buf0, grid)

      return
      end

C-------------------------------------------------------------------
      integer function ef_columnsetrowlabels(colname, labels)
      implicit none

      character*(*) colname
      integer labels

      integer ilb
      BYTE_DECLARE buf0(100)
      integer str_length
      integer efc_columnsetrowlabels

      ilb = str_length(colname)
      call cstring(colname(1:ilb), buf0, '2C')

      ef_columnsetrowlabels = efc_columnsetrowlabels(buf0, labels)

      return
      end

C-------------------------------------------------------------------
      integer function ef_columnsetbgcolor(colname, color)
      implicit none

      character*(*) colname
      character*(*) color

      integer ilb
      BYTE_DECLARE buf0(100), buf1(100)
      integer str_length
      integer efc_columnsetbgcolor

      ilb = str_length(colname)
      call cstring(colname(1:ilb), buf0, '2C')

      ilb = str_length(color)
      call cstring(color(1:ilb), buf1, '2C')

      ef_columnsetbgcolor = efc_columnsetbgcolor(buf0, buf1)

      return
      end

C-------------------------------------------------------------------
      integer function ef_columnsetheader(colname, header)
      implicit none

      character*(*) colname
      character*(*) header

      integer ilb
      BYTE_DECLARE buf0(100), buf1(100)
      integer str_length
      integer efc_columnsetheader

      ilb = str_length(colname)
      call cstring(colname(1:ilb), buf0, '2C')

      ilb = str_length(header)
      call cstring(header(1:ilb), buf1, '2C')

      ef_columnsetheader = efc_columnsetheader(buf0, buf1)

      return
      end

C-------------------------------------------------------------------
      integer function ef_columnsetfontname(colname, fontname)
      implicit none

      character*(*) colname
      character*(*) fontname

      integer ilb
      BYTE_DECLARE buf0(100), buf1(100)
      integer str_length
      integer efc_columnsetfontname

      ilb = str_length(colname)
      call cstring(colname(1:ilb), buf0, '2C')

      ilb = str_length(fontname)
      call cstring(fontname(1:ilb), buf1, '2C')

      ef_columnsetfontname = efc_columnsetfontname(buf0, buf1)

      return
      end

C-------------------------------------------------------------------
      integer function ef_columnsetfontstyle(colname, fontstyle)
      implicit none

      character*(*) colname
      character*(*) fontstyle

      integer ilb
      BYTE_DECLARE buf0(100), buf1(100)
      integer str_length
      integer efc_columnsetfontstyle

      ilb = str_length(colname)
      call cstring(colname(1:ilb), buf0, '2C')

      ilb = str_length(fontstyle)
      call cstring(fontstyle(1:ilb), buf1, '2C')

      ef_columnsetfontstyle = efc_columnsetfontstyle(buf0, buf1)

      return
      end

C-------------------------------------------------------------------
      integer function ef_columnsetfontsize(colname, fontsize)
      implicit none

      character*(*) colname
      integer fontsize

      integer ilb
      BYTE_DECLARE buf0(100)
      integer str_length
      integer efc_columnsetfontsize

      ilb = str_length(colname)
      call cstring(colname(1:ilb), buf0, '2C')

      ef_columnsetfontsize = efc_columnsetfontsize(buf0, fontsize)

      return
      end

C-------------------------------------------------------------------
      integer function ef_columnsetfontcolor(colname, color)
      implicit none

      character*(*) colname
      character*(*) color

      integer ilb
      BYTE_DECLARE buf0(100), buf1(100)
      integer str_length
      integer efc_columnsetfontcolor

      ilb = str_length(colname)
      call cstring(colname(1:ilb), buf0, '2C')

      ilb = str_length(color)
      call cstring(color(1:ilb), buf1, '2C')

      ef_columnsetfontcolor = efc_columnsetfontcolor(buf0, buf1)

      return
      end

C-------------------------------------------------------------------
      integer function ef_tableaddtoptext(tablename, text, font,
     $   style, fontsize, color, bgcolor)
      implicit none

      character*(*) tablename
      character*(*) text
      character*(*) font
      character*(*) style
      integer fontsize
      character*(*) color
      character*(*) bgcolor

      integer ilb
      BYTE_DECLARE buf0(100), buf1(100), buf2(100), buf3(100)
      BYTE_DECLARE buf4(100), buf5(100)
      integer str_length
      integer efc_tableaddtoptext

      ilb = str_length(tablename)
      call cstring(tablename(1:ilb), buf0, '2C')

      ilb = str_length(text)
      call cstring(text(1:ilb), buf1, '2C')

      ilb = str_length(font)
      call cstring(font(1:ilb), buf2, '2C')

      ilb = str_length(style)
      call cstring(style(1:ilb), buf3, '2C')

      ilb = str_length(color)
      call cstring(color(1:ilb), buf4, '2C')

      ilb = str_length(bgcolor)
      call cstring(bgcolor(1:ilb), buf5, '2C')

      ef_tableaddtoptext = efc_tableaddtoptext(buf0, buf1, buf2,
     $     buf3, fontsize, buf4, buf5)

      return
      end

C-------------------------------------------------------------------
      integer function ef_tableaddbottomtext(tablename, text, font,
     $   style, fontsize, color, bgcolor)
      implicit none

      character*(*) tablename
      character*(*) text
      character*(*) font
      character*(*) style
      integer fontsize
      character*(*) color
      character*(*) bgcolor

      integer ilb
      BYTE_DECLARE buf0(100), buf1(100), buf2(100), buf3(100)
      BYTE_DECLARE buf4(100), buf5(100)
      integer str_length
      integer efc_tableaddbottomtext

      ilb = str_length(tablename)
      call cstring(tablename(1:ilb), buf0, '2C')

      ilb = str_length(text)
      call cstring(text(1:ilb), buf1, '2C')

      ilb = str_length(font)
      call cstring(font(1:ilb), buf2, '2C')

      ilb = str_length(style)
      call cstring(style(1:ilb), buf3, '2C')

      ilb = str_length(color)
      call cstring(color(1:ilb), buf4, '2C')

      ilb = str_length(bgcolor)
      call cstring(bgcolor(1:ilb), buf5, '2C')

      ef_tableaddbottomtext = efc_tableaddbottomtext(buf0, buf1, buf2,
     $     buf3, fontsize, buf4, buf5)

      return
      end

C-------------------------------------------------------------------
      integer function ef_graphsetzaxis(graphname, loglin)
      implicit none

      character*(*) graphname
      integer loglin

      integer ilb
      BYTE_DECLARE buf0(100)
      integer str_length
      integer efc_graphsetzaxis

      ilb = str_length(graphname)
      call cstring(graphname(1:ilb), buf0, '2C')

      ef_graphsetzaxis = efc_graphsetzaxis(buf0, loglin)

      return
      end
