Subversion Repositories SvarDOS

Rev

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

Rev 1334 Rev 1335
Line 173... Line 173...
173
}
173
}
174
 
174
 
175
 
175
 
176
static void ui_basic(const struct file *db) {
176
static void ui_basic(const struct file *db) {
177
  const char *s = svarlang_strid(0); /* HELP */
177
  const char *s = svarlang_strid(0); /* HELP */
178
  unsigned char helpcol = screenw - (strlen(s) + 4);
178
  unsigned char helpcol = screenw - strlen(s);
179
 
179
 
180
  /* fill status bar with background (without modflag as it is refreshed by ui_refresh) */
180
  /* fill status bar with background (without modflag as it is refreshed by ui_refresh) */
181
  mdr_cout_char_rep(screenh - 1, 1, ' ', SCHEME_STBAR1, screenw - 1);
181
  mdr_cout_char_rep(screenh - 1, 1, ' ', SCHEME_STBAR1, screenw - 1);
182
 
182
 
183
  /* filename */
183
  /* filename */
Line 189... Line 189...
189
 
189
 
190
  /* eol type */
190
  /* eol type */
191
  {
191
  {
192
    const char *eoltype = "CRLF";
192
    const char *eoltype = "CRLF";
193
    if (db->lfonly) eoltype = "LF";
193
    if (db->lfonly) eoltype = "LF";
194
    mdr_cout_str(screenh - 1, helpcol - 5, eoltype, SCHEME_STBAR1, 5);
194
    mdr_cout_str(screenh - 1, helpcol - 6, eoltype, SCHEME_STBAR1, 5);
195
  }
195
  }
196
 
196
 
197
  mdr_cout_str(screenh - 1, helpcol, " F1=", SCHEME_STBAR2, 40);
-
 
198
  mdr_cout_str(screenh - 1, helpcol + 4, s, SCHEME_STBAR2, 40);
197
  mdr_cout_str(screenh - 1, helpcol, s, SCHEME_STBAR2, 40);
199
}
198
}
200
 
199
 
201
 
200
 
202
static void ui_msg(const char *msg1, const char *msg2, unsigned char attr) {
201
static void ui_msg(const char *msg1, const char *msg2, unsigned char attr) {
203
  unsigned short x, y, msglen, i;
202
  unsigned short x, y, msglen, i;
Line 224... Line 223...
224
 
223
 
225
static void ui_help(void) {
224
static void ui_help(void) {
226
#define MAXLINLEN 35
225
#define MAXLINLEN 35
227
  unsigned short i, offset;
226
  unsigned short i, offset;
228
  offset = (screenw - MAXLINLEN + 2) >> 1;
227
  offset = (screenw - MAXLINLEN + 2) >> 1;
-
 
228
 
229
  mdr_cout_cursor_hide();
229
  mdr_cout_cursor_hide();
230
  for (i = 2; i <= 15; i++) {
230
  for (i = 2; i < 18; i++) {
231
    mdr_cout_char_rep(i, offset - 2, ' ', SCHEME_STBAR1, MAXLINLEN + 2);
231
    mdr_cout_char_rep(i, offset - 2, ' ', SCHEME_STBAR1, MAXLINLEN + 2);
232
  }
232
  }
233
 
233
 
-
 
234
  for (i = 0; i < 20; i++) {
234
  mdr_cout_str(3, offset, svarlang_str(0, 0), SCHEME_STBAR1, MAXLINLEN);
235
    const char *s = svarlang_str(8, i);
235
  for (i = 0; i <= 4; i++) {
236
    if (s[0] == 0) break;
-
 
237
    if (s[0] == '.') continue;
236
    mdr_cout_str(5 + i, offset, svarlang_str(8, i), SCHEME_STBAR1, MAXLINLEN);
238
    mdr_cout_str(3 + i, offset, s, SCHEME_STBAR1, MAXLINLEN);
237
  }
239
  }
238
  mdr_cout_str(5 + 1 + i, offset, svarlang_str(8, 10), SCHEME_STBAR1, MAXLINLEN);
-
 
239
 
-
 
240
  /* Press any key */
-
 
241
  mdr_cout_str(14, offset, svarlang_str(8, 11), SCHEME_STBAR1, MAXLINLEN);
-
 
242
 
240
 
243
  keyb_getkey();
241
  keyb_getkey();
244
  mdr_cout_cursor_show();
242
  mdr_cout_cursor_show();
245
#undef MAXLINLEN
243
#undef MAXLINLEN
246
}
244
}