summaryrefslogtreecommitdiff
path: root/lib-src/profile.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* A simpler, centralized INLINE.Paul Eggert2013-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/profile.c (INLINE): New macro. (SYSTIME_INLINE): Remove. * src/conf_post.h (INLINE): Define only if not already defined. This allows us to use a single INLINE, defined by one file per executable. * src/emacs.c (INLINE): Define it. Also, include category.h, charset.h, composite.h, dispextern.h, syntax.h, systime.h, so that their INLINE definitions are expanded properly for Emacs. * src/blockinput.h, src/keyboard.c (BLOCKINPUT_INLINE): * src/buffer.h, src/buffer.c (BUFFER_INLINE): * src/category.h, src/category.c (CATEGORY_INLINE): * src/character.h, src/character.c (CHARACTER_INLINE): * src/charset.h, src/charset.c (CHARSET_INLINE): * src/composite.h, src/composite.c (COMPOSITE_INLINE): * src/dispextern.h, src/dispnew.c (DISPEXTERN_INLINE): * src/frame.h, src/frame.c (FRAME_INLINE): * src/intervals.h, src/intervals.c (INTERVALS_INLINE): * src/keyboard.h, src/keyboard.c (KEYBOARD_INLINE): * src/lisp.h, src/alloc.c (LISP_INLINE): * src/process.h, src/process.c (PROCESS_INLINE): * src/syntax.h, src/syntax.c (SYNTAX_INLINE): * src/systime.h, src/sysdep.c (SYSTIME_INLINE): * src/termhooks.h, src/terminal.h (TERMHOOKS_INLINE): * src/window.h, src/window.c (WINDOW_INLINE): Remove. All uses replaced with INLINE.
* Simplify EMACS_TIME-related code.Paul Eggert2013-08-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This portability layer is no longer needed, since Emacs has been using struct timespec as a portability layer for some time. Merge from gnulib, incorporating: 2013-08-27 timespec: new convenience constants and function * src/atimer.h, src/buffer.h, src/dispextern.h, src/xgselect.h: Include <time.h> rather than "systime.h"; that's all that's needed now. * src/dispnew.c: Include <timespec.h> rather than "systime.h"; that's all that's needed now. * src/systime.h (EMACS_TIME): Remove. All uses changed to struct timespec. (EMACS_TIME_RESOLUTION): Remove. All uses changed to TIMESPEC_RESOLUTION. (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to LOG10_TIMESPEC_RESOLUTION. (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec. (EMACS_NSECS): Remove. All uses changed to tv_nsec. (make_emacs_time): Remove. All used changed to make_timespec. (invalid_timespec): Rename from invalid_emacs_time. All uses changed. (current_timespec): Rename from current_emacs_time. All uses changed. (add_emacs_time): Remove. All uses changed to timespec_add. (sub_emacs_time): Remove. All uses change dot timespec_sub. (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign. (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed. (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec. (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod. (current_timespec): Rename from current_emacs_time. All uses changed. (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses changed to timespec_cmp. * src/xgselect.c: Include <timespec.h>, since our .h files don't.
* Update copyright notices for 2013.Paul Eggert2013-01-011-1/+2
|
* Use C99-style 'extern inline' if available.Paul Eggert2012-08-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib-src/profile.c (SYSTIME_INLINE): Define. * nt/config.nt: Sync with autogen/config.in. (_GL_INLINE, _GL_EXTERN_INLINE, _GL_INLINE_HEADER_BEGIN) (_GL_INLINE_HEADER_END): New macros. * src/buffer.h (BUFFER_INLINE): * src/category.h (CATEGORY_INLINE): * src/character.h (CHARACTER_INLINE): * src/charset.h (CHARSET_INLINE): * src/composite.h (COMPOSITE_INLINE): * src/dispextern.h (DISPEXTERN_INLINE): * src/lisp.h (LISP_INLINE): * src/systime.h (SYSTIME_INLINE): New macro, replacing 'static inline' in this header. * src/buffer.h, src/category.h, src/character.h, src/charset.h: * src/composite.h, src/dispextern.h, lisp.h, systime.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END. * src/alloc.c (LISP_INLINE): * src/buffer.c (BUFFER_INLINE): * src/category.c (CATEGORY_INLINE): * src/character.c (CHARACTER_INLINE): * src/charset.c (CHARSET_INLINE): * src/composite.c (COMPOSITE_INLINE): * src/dispnew.c (DISPEXTERN_INLINE): * src/sysdep.c (SYSTIME_INLINE): Define to EXTERN_INLINE, so that the corresponding functions are compiled into code. * src/conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN) (INLINE_HEADER_END): New macros. * src/lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant, since it's used in non-static inline functions now.
* EMACS_TIME simplification (Bug#11875).Paul Eggert2012-07-101-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces macros (which typically do not work in GDB) with functions, typedefs and enums, making the code easier to debug. The functional style also makes code easier to read and maintain. * lib-src/profile.c (TV2): Remove no-longer-needed static var. * src/systime.h: Include <sys/time.h> on all hosts, not just if WINDOWSNT, since 'struct timeval' is needed in general. (EMACS_TIME): Now a typedef, not a macro. (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants, not macros. (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P) (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ) (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT) (EMACS_TIME_LE): Now functions, not macros. (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS) (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros, which are not functions. All uses rewritten to use: (make_emacs_time): New function. (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME) (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are not functions. All uses rewritten to use the following, respectively: (emacs_secs_addr, invalid_emacs_time, get_emacs_time) (add_emacs_time, sub_emacs_time): New functions. * src/atimer.c: Don't include <sys/time.h>, as "systime.h" does this. * src/fileio.c (Fcopy_file): * src/xterm.c (XTflash): Get the current time closer to when it's used. * src/makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
* Adapt the MS-DOS build to the latest changes.Eli Zaretskii2012-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | msdos/mainmake.v2 (bootstrap-clean): Do a maintainer-clean in lib, not bootstrap-clean (which doesn't exist). msdos/inttypes.h (PRIuMAX) [__DJGPP__ < 2.04]: Define to "llu". msdos/sedleim.inp (MKDIR_P): Edit to DOS "md" command. msdos/sed1v2.inp: (LIB_CLOCK_GETTIME): Edit to empty. Remove lines that invoke PAXCTL. (clean): Fix recipe not to run Unixy shell commands. msdos/sed2v2.inp (GETTIMEOFDAY_TIMEZONE): Edit to 'struct timezone'. (HAVE_STRNCASECMP): Edit to 1. msdos/sed3v2.inp (LIB_CLOCK_GETTIME): Edit to empty. (C_SWITCH_SYSTEM): Add "-I../msdos". msdos/sedlibmk.inp (GNULIB_GETTIMEOFDAY, GNULIB_PSELECT) (GNULIB_SELECT, HAVE_STRUCT_TIMEVAL, HAVE_SYS_SELECT_H) (HAVE_SYS_TIME_H, NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H) (NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H, NEXT_SYS_SELECT_H) (NEXT_SYS_TIME_H, REPLACE_GETTIMEOFDAY, REPLACE_PSELECT) (REPLACE_STRUCT_TIMEVAL): Edit to appropriate values. (BUILT_SOURCES): Edit out sys/select.h and sys/time.h. (mostlyclean-local, distclean-generic): Fix recipe not to run Unixy shell commands. src/sysselect.h [DOS_NT]: Don't include sys/select.h. src/s/ms-w32.h (select, pselect): Don't define here, they are defined in sysselect.h src/sysselect.h (pselect) [!HAVE_PSELECT]: Redirect to sys_select. src/sysdep.c: Don't include dos.h and dosfns.h. src/process.c (sys_select): src/msdos.c (sys_select): Accept one more argument and ignore it. src/msdos.c (event_timestamp, sys_select): Use gnulib's gettime; adapt data types and code to that. src/dosfns.c: src/msdos.c (gettime, settime): Define away the prototypes in dos.h, which clashes with the gnulib function of the same name. lisp/emacs-lisp/timer.el (timer-until): Subtract results of float-time, instead of taking float-time of the result of time-subtract, since float-time signals an error for negative time arguments.
* Support higher-resolution time stamps.Paul Eggert2012-06-221-20/+12
| | | | Fixes: debbugs:9000
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Declare file-scope functions and variables static if not exported.Paul Eggert2011-02-211-2/+2
| | | | | | | | This is more consistent, and is nicer with gcc -Wstrict-prototypes. * ebrowse.c, emacsclient.c, fakemail.c, make-docfile.c, movemail.c: * profile.c, test-distrib.c, update-game-score.c: Declare non-'main' functions and variables to be static. * ebrowse.c: Omit redundant function prototypes.
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-2/+1
|
* Nuke arch-tags.Glenn Morris2011-01-151-2/+0
|
* Merge from emacs-23Stefan Monnier2011-01-141-1/+1
|\
| * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
| |
* | Convert function definitions to standard C.Dan Nicolaescu2010-07-021-3/+3
|/ | | | | | | | | | | | | | | * lib-src/update-game-score.c: Convert function definitions to standard C. * lib-src/sorted-doc.c: * lib-src/profile.c: * lib-src/pop.c: * lib-src/movemail.c: * lib-src/make-docfile.c: * lib-src/hexl.c: * lib-src/fakemail.c: * lib-src/etags.c: * lib-src/ebrowse.c: * lib-src/digest-doc.c: * lib-src/b2m.c: Likewise.
* Add 2010 to copyright years.Glenn Morris2010-01-131-1/+1
|
* Add 2009 to copyright years.Glenn Morris2009-01-081-1/+1
|
* Switch to recommended form of GPLv3 permissions notice.Glenn Morris2008-05-091-9/+7
|
* Add 2008 to copyright years.Glenn Morris2008-01-071-1/+1
|
* Switch license to GPLv3 or later.Glenn Morris2007-07-251-1/+1
|
* Update copyright for years from Emacs 21 to present (mainly addingGlenn Morris2007-01-161-2/+2
| | | | 2001).
* Update years in copyright notice; nfc.Thien-Thi Nguyen2006-02-061-1/+1
|
* Update years in copyright notice; nfc.Thien-Thi Nguyen2005-08-071-1/+2
|
* Update FSF's address.Lute Kamstra2005-07-041-2/+2
|
* Throughout, replace 0 destined for `exit' arg with `EXIT_SUCCESS'.Thien-Thi Nguyen2004-05-081-3/+5
| | | | | Likewise, replace 1 with `EXIT_FAILURE'. (main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value.
* Add arch taglinesMiles Bader2003-09-011-0/+3
|
* Trailing whitespace deleted.Juanma Barranquero2003-02-041-1/+1
|
* Remove unnecessary whitespaces.Pavel Janík2001-12-301-3/+3
|
* Include config.h, not ../src/config.h and systime.h, not ../src/systime.h.Pavel Janík2001-10-081-2/+2
|
* Add support for large files. Merge glibc 2.1.2.Paul Eggert1999-10-191-2/+2
| | | | | | | | | | | | | | | | | | * b2m.c, emacsclient.c, emacsserver.c, fakemail.c, make-docfile.c, movemail.c, pop.c: Do not include <stdlib.h>, as <config.h> does this now. * b2m.c, emacsserver.c, etags.c, profile.c: Include <config.h> before any system include files. * emacsclient.c, emacsserver.c, fakemail.c, movemail.c, pop.c, test-distrib.c: (read, write, open, close): Do not undef. * getopt.c, getopt1.c: Adopt glibc 2.1.2, with the following fix: (const): Do not define if HAVE_CONFIG_H; that's config.h's job. * getopt.h: Adopt glibc 2.1.2.
* (get_time): Cast arg to fprintf.Richard M. Stallman1997-08-131-1/+1
|
* Declare main as int, not void.Karl Heuer1996-07-151-1/+1
|
* Update FSF's address in the preamble.Erik Naggum1996-01-151-12/+13
|
* (gettimeofday): New function, defined if necessary.Richard M. Stallman1995-07-301-0/+17
|
* (get_time): Fix up whitespace.Richard M. Stallman1994-11-281-1/+1
|
* (TV1, TV2): Use EMACS_TIME as type.Richard M. Stallman1994-11-101-8/+3
| | | | (get_time): Use EMACS_SUB_TIME.
* Eliminate some -Wall warnings.David J. MacKenzie1994-10-121-1/+1
|
* (reset_watch, get_time): Use EMACS_GET_TIME.Richard M. Stallman1994-07-251-11/+2
| | | | (tzp): Var deleted.
* (gettimeofday): If system doesn't have this, define it to give a fatal error.Richard M. Stallman1994-04-141-0/+8
|
* (main, get_time): Don't crash on invalid input.Karl Heuer1994-02-231-5/+8
|
* (get_time): Simplify; avoid calling index.Karl Heuer1994-02-221-7/+3
| | | | (main): exit on EOF.
* Initial revisionRichard M. Stallman1994-02-071-0/+93