Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 75052
Collapse All | Expand All

(-)qemacs-0.3.1/buffer.c (-5 / +6 lines)
Lines 1437-1447 Link Here
1437
    if (stat(filename, &st) == 0)
1437
    if (stat(filename, &st) == 0)
1438
        mode = st.st_mode & 0777;
1438
        mode = st.st_mode & 0777;
1439
1439
1440
    /* backup old file if present */
1440
    /* backup old file if present and make-backup-files is on */
1441
    strcpy(buf1, filename);
1441
    if(mbf == 1) {
1442
    strcat(buf1, "~");
1442
 strcpy(buf1, filename);
1443
    rename(filename, buf1);
1443
 strcat(buf1, "~");
1444
1444
 rename(filename, buf1);
1445
    }
1445
    ret = b->data_type->buffer_save(b, filename);
1446
    ret = b->data_type->buffer_save(b, filename);
1446
    if (ret < 0)
1447
    if (ret < 0)
1447
        return ret;
1448
        return ret;
(-)qemacs-0.3.1/configure (-3 / +1 lines)
Lines 310-318 Link Here
310
echo -n "VERSION=" >>config.mak
310
echo -n "VERSION=" >>config.mak
311
head $source_path/VERSION >>config.mak
311
head $source_path/VERSION >>config.mak
312
echo "" >>config.mak
312
echo "" >>config.mak
313
echo -n "#define QE_VERSION \"" >> $TMPH
313
echo "#define QE_VERSION \"`head $source_path/VERSION`\"" >> $TMPH
314
head $source_path/VERSION >> $TMPH
315
echo "\"" >> $TMPH
316
if test "$network" = "yes" ; then
314
if test "$network" = "yes" ; then
317
  echo "#define CONFIG_NETWORK 1" >> $TMPH
315
  echo "#define CONFIG_NETWORK 1" >> $TMPH
318
  echo "CONFIG_NETWORK=yes" >> config.mak
316
  echo "CONFIG_NETWORK=yes" >> config.mak
(-)qemacs-0.3.1/qe.c (-1 / +9 lines)
Lines 61-67 Link Here
61
static QEditScreen global_screen;
61
static QEditScreen global_screen;
62
static int screen_width = 0;
62
static int screen_width = 0;
63
static int screen_height = 0;
63
static int screen_height = 0;
64
64
mbf = 1;
65
/* mode handling */
65
/* mode handling */
66
66
67
void qe_register_mode(ModeDef *m)
67
void qe_register_mode(ModeDef *m)
Lines 4319-4324 Link Here
4319
    do_refresh(qs->first_window);
4319
    do_refresh(qs->first_window);
4320
}
4320
}
4321
4321
4322
static void make_backup_files(EditState *s) {
4323
     if(mbf == 1) {
4324
  mbf = 0;
4325
     } else {
4326
  mbf = 1;
4327
     }
4328
}
4329
4322
/* compute default path for find/save buffer */
4330
/* compute default path for find/save buffer */
4323
static void get_default_path(EditState *s, char *buf, int buf_size)
4331
static void get_default_path(EditState *s, char *buf, int buf_size)
4324
{
4332
{
(-)qemacs-0.3.1/qe.h (+2 lines)
Lines 1140-1142 Link Here
1140
int qe_bitmap_format_to_pix_fmt(int format);
1140
int qe_bitmap_format_to_pix_fmt(int format);
1141
1141
1142
#endif
1142
#endif
1143
1144
int mbf;
(-)qemacs-0.3.1/qeconfig.h (+2 lines)
Lines 68-73 Link Here
68
    CMD1( KEY_CTRLX(KEY_CTRL('u')), KEY_NONE, "upcase-region", 
68
    CMD1( KEY_CTRLX(KEY_CTRL('u')), KEY_NONE, "upcase-region", 
69
          do_changecase_region, 1)
69
          do_changecase_region, 1)
70
70
71
    CMD0( KEY_NONE, KEY_NONE, "make-backup-files", make_backup_files)
72
71
    /* keyboard macros */
73
    /* keyboard macros */
72
    CMD0( KEY_CTRLX('('), KEY_NONE, "start-kbd-macro", do_start_macro)
74
    CMD0( KEY_CTRLX('('), KEY_NONE, "start-kbd-macro", do_start_macro)
73
    CMD0( KEY_CTRLX(')'), KEY_NONE, "end-kbd-macro", do_end_macro)
75
    CMD0( KEY_CTRLX(')'), KEY_NONE, "end-kbd-macro", do_end_macro)
(-)qemacs-0.3.1/shell.c (-2 / +21 lines)
Lines 78-85 Link Here
78
#definePTYCHAR1 "pqrstuvwxyz"
78
#definePTYCHAR1 "pqrstuvwxyz"
79
#definePTYCHAR2 "0123456789abcdef"
79
#definePTYCHAR2 "0123456789abcdef"
80
80
81
/* allocate one pty/tty pair */
81
/* allocate one pty/tty pair, the old way */
82
static int get_pty(char *tty_str)
82
static int old_get_pty(char *tty_str)
83
{
83
{
84
   int fd;
84
   int fd;
85
   char ptydev[] = "/dev/pty??";
85
   char ptydev[] = "/dev/pty??";
Lines 103-108 Link Here
103
   return -1;
103
   return -1;
104
}
104
}
105
105
106
/* ...and the devpts way */
107
static int get_pty(char *tty_str)
108
{
109
    int fd;
110
    fd = getpt();
111
    if(!fd) return -1;
112
    grantpt(fd);
113
    unlockpt(fd);
114
    char *ttyname = ptsname();
115
    strcpy(tty_str, ttyname);  
116
    return fd;
117
}
118
106
static int run_process(const char *path, char **argv, 
119
static int run_process(const char *path, char **argv, 
107
                       int *fd_ptr, int *pid_ptr)
120
                       int *fd_ptr, int *pid_ptr)
108
{
121
{
Lines 111-116 Link Here
111
    struct winsize ws;
124
    struct winsize ws;
112
125
113
    pty_fd = get_pty(tty_name);
126
    pty_fd = get_pty(tty_name);
127
128
    /* Try using legacy PTYs if the above doesn't work. */
129
    if(pty_fd < 0) {
130
 pty_fd = old_get_pty(tty_name);
131
    }
132
114
    fcntl(pty_fd, F_SETFL, O_NONBLOCK);
133
    fcntl(pty_fd, F_SETFL, O_NONBLOCK);
115
    if (pty_fd < 0)
134
    if (pty_fd < 0)
116
        return -1;
135
        return -1;

Return to bug 75052