*** attr.c.orig	Wed Aug  9 11:13:53 2000
--- attr.c	Wed Aug  9 11:13:53 2000
***************
*** 1491,1495 ****
  }
  
- static
  void FreeRestrictedAttrNames(ppsz_restricted, num_restricted)
     char **ppsz_restricted;
--- 1491,1494 ----
***************
*** 1508,1512 ****
  }
  
- static
  void GetRestrictedAttrNames(restricted_attr_obj, pppsz_restricted,
        pn_num_restricted)
--- 1507,1510 ----
***************
*** 1561,1565 ****
  }
  
- static
  int IsRestrictedAttr(attr_name, ppsz_restricted, num_restricted)
     char *attr_name, **ppsz_restricted;
--- 1559,1562 ----
*** drawing.c.orig	Wed Aug  9 11:13:55 2000
--- drawing.c	Wed Aug  9 11:13:55 2000
***************
*** 2838,2844 ****
     int index;
  {
!    int i=0, num_attrs=0;
     char **attr_strings=NULL, cmd[MAXSTRING<<1], title[MAXSTRING];
!    struct AttrRec *attr_ptr=NULL;
     FILE *pfp=NULL;
     TmpFileInfo tfi;
--- 2838,2846 ----
     int index;
  {
!    int i=0, num_attrs=0, total_attrs=0;
!    int restricted=FALSE, num_restricted=0, actual_index=0, found=FALSE;
     char **attr_strings=NULL, cmd[MAXSTRING<<1], title[MAXSTRING];
!    char **ppsz_restricted=NULL;
!    struct AttrRec *attr_ptr=NULL, *restricted_attr=NULL;
     FILE *pfp=NULL;
     TmpFileInfo tfi;
***************
*** 2850,2853 ****
--- 2852,2858 ----
        return;
     }
+    for (attr_ptr=topSel->obj->fattr; attr_ptr != NULL;
+          attr_ptr=attr_ptr->next, total_attrs++) {
+    }
     attr_ptr = topSel->obj->fattr;
  
***************
*** 2855,2865 ****
     attr_strings = gpEditAttrInEditorAttrInfo->attr_strings;
  
!    for (i=0; i < num_attrs; i++, attr_ptr=attr_ptr->next) {
!       if (i == index) {
           break;
        }
     }
!    if (i == num_attrs || attr_ptr == NULL) return;
  
     memset(&tfi, 0, sizeof(TmpFileInfo));
     if (!WriteAttrToTmp(attr_ptr, &tfi)) return;
--- 2860,2890 ----
     attr_strings = gpEditAttrInEditorAttrInfo->attr_strings;
  
!    if (total_attrs <= 0 || num_attrs <= 0 || attr_strings == NULL) return;
! 
!    restricted = HasEditAttrsInContextMenu(topSel->obj, &restricted_attr);
!    if (restricted) {
!       GetRestrictedAttrNames(restricted_attr->obj, &ppsz_restricted,
!             &num_restricted);
!       if (ppsz_restricted == NULL || num_restricted <= 0) {
!          return;
!       }
!    }
!    for (i=0; i < total_attrs; i++, attr_ptr=attr_ptr->next) {
!       if (restricted) {
!          if (!IsRestrictedAttr(attr_ptr->attr_name.s, ppsz_restricted,
!                num_restricted)) {
!             continue;
!          }
!       }
!       if (actual_index == index) {
!          found = TRUE;
           break;
        }
+       actual_index++;
     }
!    FreeRestrictedAttrNames(ppsz_restricted, num_restricted);
  
+    if (!found) return;
+ 
     memset(&tfi, 0, sizeof(TmpFileInfo));
     if (!WriteAttrToTmp(attr_ptr, &tfi)) return;
*** eps.c.orig	Wed Aug  9 11:13:56 2000
--- eps.c	Wed Aug  9 11:13:56 2000
***************
*** 466,472 ****
  
  static
! int ConvertTiffToXbm(fp, tiff_offset, tiff_sz, xbm_fname)
     FILE *fp;
!    int tiff_offset, tiff_sz;
     char *xbm_fname;
  {
--- 466,472 ----
  
  static
! int ConvertTiffToXbm(fp, tiff_offset, tiff_sz, xbm_fname, xbm_sz)
     FILE *fp;
!    int tiff_offset, tiff_sz, xbm_sz;
     char *xbm_fname;
  {
***************
*** 579,583 ****
           int bytes_read=0;
  
!          *pnPreviewOK = ConvertTiffToXbm(fp, tiff_offset, tiff_sz, xbm_fname);
           if (fseek(fp, 0x1e, SEEK_SET) != 0) {
              return ErrorInGetTiffEPSIInfo(fp, NULL, NULL);
--- 579,584 ----
           int bytes_read=0;
  
!          *pnPreviewOK = ConvertTiffToXbm(fp, tiff_offset, tiff_sz, xbm_fname,
!                sizeof(xbm_fname));
           if (fseek(fp, 0x1e, SEEK_SET) != 0) {
              return ErrorInGetTiffEPSIInfo(fp, NULL, NULL);
***************
*** 609,613 ****
        }
     } else {
!       *pnPreviewOK = ConvertTiffToXbm(fp, tiff_offset, tiff_sz, xbm_fname);
        if (fseek(fp, 0x1e, SEEK_SET) != 0) {
           return ErrorInGetTiffEPSIInfo(fp, NULL, NULL);
--- 610,615 ----
        }
     } else {
!       *pnPreviewOK = ConvertTiffToXbm(fp, tiff_offset, tiff_sz, xbm_fname,
!             sizeof(xbm_fname));
        if (fseek(fp, 0x1e, SEEK_SET) != 0) {
           return ErrorInGetTiffEPSIInfo(fp, NULL, NULL);
*** exec.c.orig	Wed Aug  9 11:13:57 2000
--- exec.c	Wed Aug  9 11:13:57 2000
***************
*** 5426,5430 ****
        return FALSE;
     }
!    MkTempFile(fnameForPostingCGIQuery, strlen(tmpDir)+19, tmpDir, TOOL_NAME);
     if ((fp=fopen(fnameForPostingCGIQuery, "w")) == NULL) {
        sprintf(gszMsgBox, TgLoadString(STID_CANT_OPEN_FILE_WRITE_EXEC_CMD),
--- 5426,5431 ----
        return FALSE;
     }
!    MkTempFile(fnameForPostingCGIQuery, (strlen(tmpDir)+19)*sizeof(char),
!          tmpDir, TOOL_NAME);
     if ((fp=fopen(fnameForPostingCGIQuery, "w")) == NULL) {
        sprintf(gszMsgBox, TgLoadString(STID_CANT_OPEN_FILE_WRITE_EXEC_CMD),
*** file.c.orig	Wed Aug  9 11:14:00 2000
--- file.c	Wed Aug  9 11:14:00 2000
***************
*** 220,223 ****
--- 220,228 ----
     int buf_sz;
  {
+ #ifdef _TGIF_DBG /* debug, do not translate */
+    TgAssert(buf_sz > sizeof(char*),
+          "buf_sz <= sizeof(char*) in MkTempFile()", NULL);
+ #endif /* _TGIF_DBG */
+ 
  #ifndef _DONT_USE_MKTEMP
     sprintf(buf, "%s%sXXXXXX", psz_dir, psz_prefix);
*** mainloop.c.orig	Wed Aug  9 11:14:02 2000
--- mainloop.c	Wed Aug  9 11:14:02 2000
***************
*** 530,534 ****
        return NULL;
     }
!    MkTempFile(tmp_fname, strlen(tmpDir)+19, tmpDir, TOOL_NAME);
     if ((out_fp=fopen(tmp_fname, "w")) == NULL) {
        sprintf(gszMsgBox, TgLoadString(STID_CANNOT_OPEN_FILE_FOR_WRITING),
--- 530,534 ----
        return NULL;
     }
!    MkTempFile(tmp_fname, (strlen(tmpDir)+19)*sizeof(char), tmpDir, TOOL_NAME);
     if ((out_fp=fopen(tmp_fname, "w")) == NULL) {
        sprintf(gszMsgBox, TgLoadString(STID_CANNOT_OPEN_FILE_FOR_WRITING),
*** poly.c.orig	Wed Aug  9 11:14:03 2000
--- poly.c	Wed Aug  9 11:14:03 2000
***************
*** 546,549 ****
--- 546,550 ----
                 }
                 EndShowMeasureCursor(grid_x, grid_y, buf, TRUE);
+                Msg("");
                 abort = TRUE;
                 done = TRUE;
***************
*** 940,944 ****
     } else if (!abort && gstWiringInfo.num_ports_to_connect > 0) {
        XBell(mainDisplay, 0);
!       SetStringStatus(TgLoadString(STID_TRY_AGAIN_AND_END_IN_A_PORT));
        abort = TRUE;
     }
--- 941,946 ----
     } else if (!abort && gstWiringInfo.num_ports_to_connect > 0) {
        XBell(mainDisplay, 0);
!       Msg("");
!       Msg(TgLoadString(STID_TRY_AGAIN_AND_END_IN_A_PORT));
        abort = TRUE;
     }
***************
*** 951,955 ****
     RestoreStatusStrings();
     SetMouseStatus(NULL, NULL, NULL);
!    Msg("");
  
     values.join_style = JoinMiter;
--- 953,957 ----
     RestoreStatusStrings();
     SetMouseStatus(NULL, NULL, NULL);
!    if (!abort) Msg("");
  
     values.join_style = JoinMiter;
*** remote.c.orig	Wed Aug  9 11:14:04 2000
--- remote.c	Wed Aug  9 11:14:04 2000
***************
*** 558,562 ****
        return NULL;
     }
!    MkTempFile(tmp_fname, sizeof(tmp_fname), tmpDir, TOOL_NAME);
     if (psz_ext != NULL) strcat(tmp_fname, psz_ext);
     unlink(tmp_fname);
--- 558,562 ----
        return NULL;
     }
!    MkTempFile(tmp_fname, (strlen(tmpDir)+19)*sizeof(char), tmpDir, TOOL_NAME);
     if (psz_ext != NULL) strcat(tmp_fname, psz_ext);
     unlink(tmp_fname);
*** attr.e.orig	Wed Aug  9 11:14:05 2000
--- attr.e	Wed Aug  9 11:14:05 2000
***************
*** 82,85 ****
--- 82,88 ----
  extern int	HasEditAttrsInContextMenu ARGS_DECL((struct ObjRec *,
  		                                     struct AttrRec **));
+ extern int	IsRestrictedAttr ARGS_DECL((char *attr_name,
+ 		                            char **ppsz_restricted,
+ 		                            int num_restricted));
  extern EditAttrInfo	*CreateEditAttrInfo ARGS_DECL((struct ObjRec *));
  extern void	MoveAttr ARGS_DECL((void));
*** patchlvl.h.orig	Wed Aug  9 11:14:06 2000
--- patchlvl.h	Wed Aug  9 11:14:06 2000
***************
*** 35,39 ****
  #define _TGIF_PATCHLEVEL_H_
  
! #define TGIF_PATCHLEVEL 35
  
  #endif /*_TGIF_PATCHLEVEL_H_*/
--- 35,39 ----
  #define _TGIF_PATCHLEVEL_H_
  
! #define TGIF_PATCHLEVEL 36
  
  #endif /*_TGIF_PATCHLEVEL_H_*/
*** Imakefile.orig	Wed Aug  9 11:14:07 2000
--- Imakefile	Wed Aug  9 11:14:07 2000
***************
*** 54,58 ****
                    $(MOREDEFINES)
  
! TGIFVERSION	= 4.1.35
  
  XCOMM Things to try to add to the DEFINES line above:
--- 54,58 ----
                    $(MOREDEFINES)
  
! TGIFVERSION	= 4.1.36
  
  XCOMM Things to try to add to the DEFINES line above:
*** HISTORY.orig	Wed Aug  9 11:14:08 2000
--- HISTORY	Wed Aug  9 11:14:08 2000
***************
*** 1,2 ****
--- 1,10 ----
+ -----------------------> tgif-4.1.35 => tgif-4.1.36 <-----------------------
+ 1)  Fix a bug in Latest Release Info under the Help Menu.  Thanks to
+     Dr. Ing. Dieter Jurzitza <Dieter.Jurzitza@t-online.de> for
+     pointing out the bug.
+ 2)  Fix a bug in handling the Edit Attribute in Editor Context Menu
+     when the edit_attrs_in_context_menu attribute is used.  Thanks to
+     Ana Paula for pointing out the problem.
+ 
  -----------------------> tgif-4.1.34 => tgif-4.1.35 <-----------------------
  1)  Fix a bug with Copy and Paste operations in edit text mode for
***************
*** 7,11 ****
      imported EPS files when printing/exporting in PS/EPS formats.  Please note
      that this does not work with embedded EPS files (until the next major
!     release when a new file format is introduced).  Thanks to Johan Vroman
      <JVromans@squirrel.nl> for pointing out the problem.
  3)  Support the use of tempnam() instead of mktemp() due to some security
--- 15,19 ----
      imported EPS files when printing/exporting in PS/EPS formats.  Please note
      that this does not work with embedded EPS files (until the next major
!     release when a new file format is introduced).  Thanks to Johan Vromans
      <JVromans@squirrel.nl> for pointing out the problem.
  3)  Support the use of tempnam() instead of mktemp() due to some security
