Commit Graph

615 Commits

Author SHA1 Message Date
ZyX
70929f7e16 Add automatic generation of headers
- The 'stripdecls.py' script replaces declarations in all headers by includes to
  generated headers.
  `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'`
  was used for this.
- Add and integrate gendeclarations.lua into the build system to generate the
  required includes.
- Add -Wno-unused-function
- Made a bunch of old-style definitions ANSI

This adds a requirement: all type and structure definitions must be present
before INCLUDE_GENERATED_DECLARATIONS-protected include.

Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is
the only exception.
2014-06-02 11:04:17 -03:00
ZyX
880957ad4e Move documentation from function declarations to definitions
Uses a perl script to move it (scripts/movedocs.pl)
2014-06-02 11:04:04 -03:00
Thiago de Arruda
c3c826da34 API: Events: Add functions for {un}subscribing to broadcasted events 2014-05-28 08:52:54 -03:00
Thiago de Arruda
9815688fbd API: Refactor: Use macro for initializing all arrays 2014-05-23 16:06:59 -03:00
Thiago de Arruda
a842fe4dc1 API: Refactor: Return handles instead of indexes
- Define specialized arrays for each remote object type
- Implement msgpack_rpc functions for dealing with the new types
- Refactor all functions dealing with buffers, windows and tabpages to
  return/accept handles instead of list indexes.
2014-05-23 16:06:58 -03:00
Thiago de Arruda
f70f9bfac1 API: Refactor: Change the integer type of remote objects to uint64_t 2014-05-23 16:06:58 -03:00
Thiago de Arruda
72e3125f45 API: Refactor: Move non-public files to private subdirectory 2014-05-23 16:06:58 -03:00
Thiago de Arruda
399a0e3740 API: Bugfix: Terminate directory string in vim_change_directory
Also check that the string length is not equal or greater than MAXPATHL.
2014-05-23 16:06:46 -03:00
Thiago de Arruda
677d30d796 API: Bugfix: Use 0-terminated string in vim_strwidth
While the mb_string2cells function accepts a length parameter, it only seems to
work properly with 0-terminated strings, since valgrind reports a conditional
jump that depends on uninitialized values(means it reads after the string
boundaries which could result in overflows or wrong results)
2014-05-23 15:49:19 -03:00
Thiago de Arruda
c6483aa2fa API: Bugfix: Fix loop condition in vim_list_runtime_paths 2014-05-23 15:49:17 -03:00
Thiago de Arruda
45e5a18f3a Enable -Wconversion for API files and fix errors 2014-05-17 08:05:44 -03:00
Thiago de Arruda
76a2fb5667 Use more descriptive names for API primitive types
Instead of exposing native C types to a public API that can be consumed by other
platforms, we are now using the following translation:

int64_t -> Integer
double  -> Float
bool    -> Boolean
2014-05-17 08:05:44 -03:00
Eliseo Martínez
409cc138f2 Introduce nvim namespace: Fix project-local includes.
Prepend 'nvim/' in all project-local (non-system) includes.
2014-05-15 20:46:01 +02:00
Eliseo Martínez
e731a5edf8 Introduce nvim namespace: Fix relative includes.
Problem:  Some newly introduced files used includes relative to the
          current file, both of the form `include "../XXX.h"` and
          `include "XXX.h"`.
          Preferred form is relative to include root (src/ in our case).
Solution: Change includes to preferred form.
Note:     This is also done to ease next commit (prepend 'nvim/ to all
          project-local includes).
2014-05-15 20:46:01 +02:00
Eliseo Martínez
da51dc9cf2 Introduce nvim namespace: Move files.
Move files from src/ to src/nvim/.
- src/nvim/ becomes the new root dir for nvim executable sources.
- src/libnvim/ is planned to become root dir of the neovim library.
2014-05-15 20:46:01 +02:00