Subversion Repositories SvarDOS

Rev

Rev 1393 | Rev 1395 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1393 Rev 1394
Line 213... Line 213...
213
 
213
 
214
 
214
 
215
static void ui_basic(const struct file *db, unsigned short slotnum) {
215
static void ui_basic(const struct file *db, unsigned short slotnum) {
216
  const char *s = svarlang_strid(0); /* ESC=MENU */
216
  const char *s = svarlang_strid(0); /* ESC=MENU */
217
  unsigned short helpcol = screenw - strlen(s);
217
  unsigned short helpcol = screenw - strlen(s);
-
 
218
  unsigned short maxfnlen = helpcol - 14;
218
 
219
 
219
  /* slot number */
220
  /* slot number */
220
  {
221
  {
221
    char slot[4] = "#00";
222
    char slot[4] = "#00";
222
    slotnum++;
223
    slotnum++;
Line 228... Line 229...
228
  /* fill rest of status bar with background */
229
  /* fill rest of status bar with background */
229
  mdr_cout_char_rep(screenh - 1, 3, ' ', SCHEME_STBAR1, screenw - 1);
230
  mdr_cout_char_rep(screenh - 1, 3, ' ', SCHEME_STBAR1, screenw - 1);
230
 
231
 
231
  /* filename and modflag */
232
  /* filename and modflag */
232
  {
233
  {
233
    const char *fn = db->fname;
234
    const char *fn;
234
    unsigned short x;
235
    unsigned short x;
-
 
236
    if (db->fname[0] == 0) {
235
    if (*fn == 0) fn = svarlang_str(0, 1);
237
      fn = svarlang_str(0, 1); /* "UNTITLED" */
-
 
238
    } else {
-
 
239
      /* display filename up to maxfnlen chars */
-
 
240
      fn = db->fname;
-
 
241
      x = strlen(fn);
-
 
242
      if (x > maxfnlen) fn += x - maxfnlen;
-
 
243
    }
236
    x = mdr_cout_str(screenh - 1, 4, fn, SCHEME_STBAR1, screenw);
244
    x = mdr_cout_str(screenh - 1, 4, fn, SCHEME_STBAR1, maxfnlen);
237
    if (db->modflag) mdr_cout_char(screenh - 1, 5 + x, '!', SCHEME_STBAR2);
245
    if (db->modflag) mdr_cout_char(screenh - 1, 5 + x, '!', SCHEME_STBAR2);
238
  }
246
  }
239
 
247
 
240
  /* eol type */
248
  /* eol type */
241
  {
249
  {
Line 996... Line 1004...
996
    } else if (k == 0x14F) { /* end */
1004
    } else if (k == 0x14F) { /* end */
997
       cursor_eol(db);
1005
       cursor_eol(db);
998
 
1006
 
999
    } else if (k == 0x1B) { /* ESC */
1007
    } else if (k == 0x1B) { /* ESC */
1000
      int quitnow = 0;
1008
      int quitnow = 0;
1001
      char fname[25];
1009
      char fname[64];
1002
      int saveflag = 0;
1010
      int saveflag = 0;
1003
      enum MENU_ACTION ui_action;
1011
      enum MENU_ACTION ui_action;
1004
 
1012
 
1005
      /* collect the exact menu action and clear the screen */
1013
      /* collect the exact menu action and clear the screen */
1006
      ui_action = ui_menu();
1014
      ui_action = ui_menu();