ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/misc.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/s_misc.c (file contents):
Revision 2301 by michael, Wed Jun 19 12:21:28 2013 UTC vs.
Revision 2916 by michael, Sat Jan 25 21:09:18 2014 UTC

# Line 1 | Line 1
1   /*
2 < *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 < *  s_misc.c: Yet another miscellaneous functions file.
2 > *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (C) 2002 by the past and present ircd coders, and others.
4 > *  Copyright (c) 1997-2014 ircd-hybrid development team
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 18 | Line 17
17   *  along with this program; if not, write to the Free Software
18   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
19   *  USA
20 < *
21 < *  $Id$
20 > */
21 >
22 > /*! \file s_misc.c
23 > * \brief Yet another miscellaneous functions file.
24 > * \version $Id$
25   */
26  
27   #include "stdinc.h"
# Line 51 | Line 53 | static const char *const weekdays[] =
53   };
54  
55   const char *
56 < date(time_t lclock)
56 > date(time_t lclock)
57   {
58    static char buf[80], plus;
59    struct tm *lt, *gm;
60    struct tm gmbuf;
61    int minswest;
62  
63 <  if (!lclock)
63 >  if (!lclock)
64      lclock = CurrentTime;
65    gm = gmtime(&lclock);
66    memcpy(&gmbuf, gm, sizeof(gmbuf));
# Line 103 | Line 105 | smalldate(time_t lclock)
105  
106    gm = gmtime(&lclock);
107    memcpy(&gmbuf, gm, sizeof(gmbuf));
108 <  gm = &gmbuf;
108 >  gm = &gmbuf;
109    lt = localtime(&lclock);
110 <  
110 >
111    snprintf(buf, sizeof(buf), "%d/%d/%d %02d.%02d",
112             lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday,
113             lt->tm_hour, lt->tm_min);
# Line 124 | Line 126 | ssl_get_cipher(const SSL *ssl)
126  
127    snprintf(buffer, sizeof(buffer), "%s %s-%d", SSL_get_version(ssl),
128             SSL_get_cipher(ssl), bits);
127  
129    return buffer;
130   }
131   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)