Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lyskom-server-ceder-1616-generations-topgit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
2ab4baad
Commit
2ab4baad
authored
Oct 13, 1993
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
Check HAVE_VFPRINTF, and substitute another log function if we don't
have a vfprintf.
parent
9515c142
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/server/log.c
+23
-2
23 additions, 2 deletions
src/server/log.c
src/server/log.h
+12
-6
12 additions, 6 deletions
src/server/log.h
with
35 additions
and
8 deletions
src/server/log.c
+
23
−
2
View file @
2ab4baad
/*
/*
* $Id: log.c,v 0.
8
1993/10/1
2 22:20
:5
4
ceder Exp $
* $Id: log.c,v 0.
9
1993/10/1
3 00:07
:5
0
ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
* Copyright (C) 1991 Lysator Academic Computer Association.
*
*
* This file is part of the LysKOM server.
* This file is part of the LysKOM server.
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
* File created by ceder 1990-05-25.
* File created by ceder 1990-05-25.
*/
*/
static
char
*
rcsid
=
"$Id: log.c,v 0.
8
1993/10/1
2 22:20
:5
4
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: log.c,v 0.
9
1993/10/1
3 00:07
:5
0
ceder Exp $"
;
#include
"rcs.h"
#include
"rcs.h"
USE
(
rcsid
);
USE
(
rcsid
);
...
@@ -43,6 +43,7 @@ USE(rcsid);
...
@@ -43,6 +43,7 @@ USE(rcsid);
* Add a string to the log file.
* Add a string to the log file.
*/
*/
#ifdef HAVE_VFPRINTF
extern
void
extern
void
log
(
const
char
*
format
,
...)
log
(
const
char
*
format
,
...)
{
{
...
@@ -70,3 +71,23 @@ logv (const char *format, va_list AP)
...
@@ -70,3 +71,23 @@ logv (const char *format, va_list AP)
fflush
(
stderr
);
fflush
(
stderr
);
}
}
#else
/* !HAVE_VFPRINTF */
extern
void
log
(
const
char
*
format
,
int
a
,
int
b
,
int
c
,
int
d
,
int
e
,
int
f
,
int
g
)
{
time_t
clock
;
struct
tm
*
t
;
time
(
&
clock
);
t
=
localtime
(
&
clock
);
fprintf
(
stderr
,
"%04d-%02d-%02d %02d:%02d:%02d "
,
t
->
tm_year
+
1900
,
t
->
tm_mon
+
1
,
t
->
tm_mday
,
t
->
tm_hour
,
t
->
tm_min
,
t
->
tm_sec
);
fprintf
(
stderr
,
format
,
a
,
b
,
c
,
d
,
e
,
f
,
g
);
fflush
(
stderr
);
}
#endif
/* !HAVE_VFPRINTF */
This diff is collapsed.
Click to expand it.
src/server/log.h
+
12
−
6
View file @
2ab4baad
/*
/*
* $Id: log.h,v 0.
3
199
1/09/15 10:31:32 linus
Exp $
* $Id: log.h,v 0.
4
199
3/10/13 00:06:35 ceder
Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
* Copyright (C) 1991 Lysator Academic Computer Association.
*
*
* This file is part of the LysKOM server.
* This file is part of the LysKOM server.
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
*/
/*
/*
* $Id: log.h,v 0.
3
199
1/09/15 10:31:32 linus
Exp $
* $Id: log.h,v 0.
4
199
3/10/13 00:06:35 ceder
Exp $
*
*
* log.h
* log.h
*
*
...
@@ -37,12 +37,18 @@
...
@@ -37,12 +37,18 @@
* Add a string to the log file.
* Add a string to the log file.
*/
*/
#ifdef HAVE_VFPRINTF
extern
void
extern
void
log
(
const
char
*
format
,
...);
log
(
const
char
*
format
,
...);
#ifdef _STDARG_H
extern
void
extern
void
logv
(
const
char
*
format
,
va_list
AP
);
logv
(
const
char
*
format
,
va_list
AP
);
#endif
#else
/* !HAVE_VFPRINTF */
extern
void
log
(
const
char
*
format
,
...);
#endif
/* !HAVE_VFPRINTF */
#endif
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment