About LTPLUS

Carl Anderson candrsn at mindspring.com
Sun Dec 6 11:27:46 EST 1998


LTPlus4.14a

A versioning problem caused an update error in
src.related/LTPlus_4.14a/source/in/put_diary.c

remove put_diary.c, put_diary.c.rej, and put_diary.c.orig

use the the attached file instead.

Please post you success or failure with LTP to me candrsn at mindspring.com
I will summarize.

Of Note
The demo macros   demop, democ, demo_ploy, and demo_contour
have all run successfully on my Redhat5.1/i486/gcc2.7.2.3 system.
(I don't know if that means the package is completely working)

for a Sun SS5 (sparc) Solaris 2.5.1, gcc2.7.2 system
  use REDHAT CFLAGS and add -DBIG_ENDIAN
  the Redhat defines are necessary for supppressing ioctl defines
  the headers <sys/dir.h> and <dirent.h> were missing from /usr/include
   I grabbed them from my Redhat system (not the best idea)
  the bigendian define was required

after all that (on a Sun SS5)
LTP started ok, all demo macros start ok but none completed.
The menuset_get function is not working correctly.
  (looks like a bigendian problem)

General notes

LTP is not stable and is being updated.
Specifically the color handling is in transition.
 8bit color works (not so good)
 24bit color has problems
 use -DDEBUGCOLOR to see what I mean

LTP will compile and run in either, but the 24bit display is sub optimal. 
LTP arch specific defines should probably go into an arch file and
be referenced by source/incl/globals.h

LTP only works with ascii vector files
LTP needs to work with GRASS library calls

Help is needed on this project!!!!!!!!!!


----------------------------------
E-Mail: Carl Anderson <candrsn at mindspring.com>
Date: Sat, 06-Dec-98 12:00:00 +0000 (GMT)
Time: 10:22:25

This message was sent by XFMail
----------------------------------
-------------- next part --------------
static char resid[]="$Header: /cvs/grass/src.related/LTPlus4.11/source/in/put_di
ary.c,v 1.1 1995/03/20 22:45:06 jasr Exp $"; 
/*******************************************************************************
*       put_diary       (see manual, Internal Functions)                <in>   *
*                       This program appends the diary with who/what/when      *
*                       and the input string.                                  *
*                                                                              *
*                       The diary file is changed.                             *
*                                                                              *
*                       Returns zero upon normal end-of-job (EOJ).             *
*                       returns 1 upon failure.                                *
*                      j.dabritz  8/11/89                                      *
*                      
*                      move entry to temp buffer before modifying it
*				CFA 11/27/98
*******************************************************************************/

#include "../../incl/globals.h"  /*  <stdio.h> & all LTP defines & globals  */
#include <string.h>
#include <time.h>

long put_diary(diary_entry)
char *diary_entry;
{
	int fp;
	char string[256];
	char filepath[256];
	char entry_buf[1024];   /* temporary entry buffer */
	char *std_header();
	
	strcpy (entry_buf,diary_entry);
        /* move string to a local var before modifying it
           this was causing memory faults 
           CFA 11/27/98     */
           
        #ifdef DEBUG
           printf("put_diary.c: entering Put_diary()\n with entry \"%s\"\n for m
ap \"%d\"\n",entry_buf,job_stats[0]);
        #endif
		/************** check for map loaded ***************************/
	if(!job_stats[0])
	{	message("cannot make diary entry unless a map is loaded.");
		return(1);
	}

	#ifdef DEBUG
	  printf("put_diary.c: trimming entry\n");
	#endif
		/************** check & trim diary entry parameter *************/
	trim(entry_buf);
	if(!*entry_buf)
	{	message("diary entry is blank, nothing written.");
		return(1);
	}
	
	#ifdef DEBUG
	  printf("put_diary.c: open diary %s \n",filepath);
	#endif
		/************** open diary file ********************************/
	sprintf(filepath, "%s/%s", temp_map_path, "diary" );
	if( (fp = openf( filepath, APPEND)) == -1 )
		return(1);

	#ifdef DEBUG
	  printf("put_diary.c: info string %s into diary\n",string);
	#endif
		/************** write info_data string *************************/
	if( 0 > writea( std_header(string), fp) )
		return(1);

	#ifdef DEBUG
	  printf("put_diary.c: entry string %s into diary\n",diary_entry);
	#endif
		/************** write input diary_entry string *****************/
	sprintf(string,"  > %s\n\n",entry_buf);
	if( 0 > writea( string, fp) )
		return(1);

	#ifdef DEBUG
	  printf("put_diary.c: closing diary\n");
	#endif
		/************** close file *************************************/
	closef( fp );

	#ifdef DEBUG
	  printf("put_diary.c: leaving put_diary\n");
	#endif
		/************** return *****************************************/
	return(0);
}


More information about the grass-user mailing list