Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
60fb3ee1
Commit
60fb3ee1
authored
Aug 16, 1991
by
Jim Blandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
4d6cebd8
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
155 additions
and
197 deletions
+155
-197
src/xfns.c
src/xfns.c
+129
-197
src/xterm.c
src/xterm.c
+26
-0
No files found.
src/xfns.c
View file @
60fb3ee1
This diff is collapsed.
Click to expand it.
src/xterm.c
View file @
60fb3ee1
...
@@ -161,6 +161,7 @@ static FONT_TYPE *icon_font_info;
...
@@ -161,6 +161,7 @@ static FONT_TYPE *icon_font_info;
/* Stuff for dealing with the main icon title. */
/* Stuff for dealing with the main icon title. */
extern
Lisp_Object
Vcommand_line_args
;
extern
Lisp_Object
Vcommand_line_args
;
char
*
hostname
,
*
x_id_name
;
Lisp_Object
invocation_name
;
Lisp_Object
invocation_name
;
/* This is the X connection that we are using. */
/* This is the X connection that we are using. */
...
@@ -3583,11 +3584,36 @@ x_term_init (display_name)
...
@@ -3583,11 +3584,36 @@ x_term_init (display_name)
#ifdef HAVE_X11
#ifdef HAVE_X11
{
{
int
hostname_size
=
MAXHOSTNAMELEN
+
1
;
hostname
=
(
char
*
)
xmalloc
(
hostname_size
);
#if 0
#if 0
XSetAfterFunction (x_current_display, x_trace_wire);
XSetAfterFunction (x_current_display, x_trace_wire);
#endif
#endif
invocation_name
=
Ffile_name_nondirectory
(
Fcar
(
Vcommand_line_args
));
invocation_name
=
Ffile_name_nondirectory
(
Fcar
(
Vcommand_line_args
));
/* Try to get the host name; if the buffer is too short, try
again. Apparently, the only indication gethostname gives of
whether the buffer was large enough is the presence or absence
of a '\0' in the string. Eech. */
for
(;;)
{
gethostname
(
hostname
,
hostname_size
-
1
);
hostname
[
hostname_size
-
1
]
=
'\0'
;
/* Was the buffer large enough for gethostname to store the '\0'? */
if
(
strlen
(
hostname
)
<
hostname_size
-
1
)
break
;
hostname_size
<<=
1
;
hostname
=
(
char
*
)
xrealloc
(
hostname
,
hostname_size
);
}
x_id_name
=
(
char
*
)
xmalloc
(
XSTRING
(
invocation_name
)
->
size
+
strlen
(
hostname
)
+
2
);
sprintf
(
x_id_name
,
"%s@%s"
,
XSTRING
(
invocation_name
)
->
data
,
hostname
);
}
}
dup2
(
ConnectionNumber
(
x_current_display
),
0
);
dup2
(
ConnectionNumber
(
x_current_display
),
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment