summary refs log tree commit diff stats
path: root/lib/pure/htmlgen.nim
Commit message (Expand)AuthorAgeFilesLines
* Rename PNimrodNode to NimNodedef2015-03-171-89/+89
* Happy new year!Guillaume Gelin2015-01-061-1/+1
* fixes #1776Araq2014-12-241-1/+1
* big renameAraq2014-08-271-9/+8
* added a warning for htmlgenAraq2014-03-031-3/+8
* case consistency part 7Araq2013-12-281-1/+1
* fixes #393; now works with backticksAraq2013-04-231-1/+5
* Removes executable bit for text files.Grzegorz Adam Hankiewicz2013-03-161-0/+0
* parameter passing works the same for macros and templates; use callsite magic...Araq2012-08-281-78/+153
* small bugfixes; documentation generator supports smilies for the forumAraq2012-05-011-1/+1
* year 2012 for most copyright headersAraq2012-01-021-1/+1
* bugfix: proper cache for generic instantiationsAraq2011-07-211-0/+406
onstant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#
#
#            Nim's Runtime Library
#        (c) Copyright 2013 Dominik Picheta
#
#    See the file "copying.txt", included in this
#    distribution, for details about the copyright.
#

{.deadCodeElim: on.}  # dce option deprecated

from posix import SocketHandle

const
  EPOLLIN* = 0x00000001
  EPOLLPRI* = 0x00000002
  EPOLLOUT* = 0x00000004
  EPOLLERR* = 0x00000008
  EPOLLHUP* = 0x00000010
  EPOLLRDNORM* = 0x00000040
  EPOLLRDBAND* = 0x00000080
  EPOLLWRNORM* = 0x00000100
  EPOLLWRBAND* = 0x00000200
  EPOLLMSG* = 0x00000400
  EPOLLRDHUP* = 0x00002000
  EPOLLWAKEUP* = 1 shl 29
  EPOLLONESHOT* = 1 shl 30
  EPOLLET* = 1 shl 31

# Valid opcodes ( "op" parameter ) to issue to epoll_ctl().

const
  EPOLL_CTL_ADD* = 1          # Add a file descriptor to the interface.
  EPOLL_CTL_DEL* = 2          # Remove a file descriptor from the interface.
  EPOLL_CTL_MOD* = 3          # Change file descriptor epoll_event structure.

type
  EpollData* {.importc: "union epoll_data",
      header: "<sys/epoll.h>", pure, final.} = object # TODO: This is actually a union.
    u64* {.importc: "u64".}: uint64

  EpollEvent* {.importc: "struct epoll_event", header: "<sys/epoll.h>", pure, final.} = object
    events*: uint32 # Epoll events
    data*: EpollData # User data variable

proc epoll_create*(size: cint): cint {.importc: "epoll_create",
    header: "<sys/epoll.h>".}
  ## Creates an epoll instance.  Returns an fd for the new instance.
  ##   The "size" parameter is a hint specifying the number of file
  ##   descriptors to be associated with the new instance.  The fd
  ##   returned by epoll_create() should be closed with close().

proc epoll_create1*(flags: cint): cint {.importc: "epoll_create1",
    header: "<sys/epoll.h>".}
  ## Same as epoll_create but with an FLAGS parameter.  The unused SIZE
  ##   parameter has been dropped.

proc epoll_ctl*(epfd: cint; op: cint; fd: cint | SocketHandle; event: ptr EpollEvent): cint {.
    importc: "epoll_ctl", header: "<sys/epoll.h>".}
  ## Manipulate an epoll instance "epfd". Returns 0 in case of success,
  ##   -1 in case of error ( the "errno" variable will contain the
  ##   specific error code ) The "op" parameter is one of the EPOLL_CTL_*
  ##   constants defined above. The "fd" parameter is the target of the
  ##   operation. The "event" parameter describes which events the caller
  ##   is interested in and any associated user data.

proc epoll_wait*(epfd: cint; events: ptr EpollEvent; maxevents: cint;
                 timeout: cint): cint {.importc: "epoll_wait",
    header: "<sys/epoll.h>".}
  ## Wait for events on an epoll instance "epfd". Returns the number of
  ##   triggered events returned in "events" buffer. Or -1 in case of
  ##   error with the "errno" variable set to the specific error code. The
  ##   "events" parameter is a buffer that will contain triggered
  ##   events. The "maxevents" is the maximum number of events to be
  ##   returned ( usually size of "events" ). The "timeout" parameter
  ##   specifies the maximum wait time in milliseconds (-1 == infinite).
  ##
  ##   This function is a cancellation point and therefore not marked with
  ##   __THROW.


#proc epoll_pwait*(epfd: cint; events: ptr EpollEvent; maxevents: cint;
#                  timeout: cint; ss: ptr sigset_t): cint {.
#    importc: "epoll_pwait", header: "<sys/epoll.h>".}
# Same as epoll_wait, but the thread's signal mask is temporarily
#   and atomically replaced with the one provided as parameter.
#
#   This function is a cancellation point and therefore not marked with
#   __THROW.