gschem: Don't import srfi-69 in keymap.scm.

We don't currently use SRFI 69 functions in the keymap system anyway.

Closes-bug: lp-923874
libgeda: Fix incorrect Postscript output for missing pictures

Closes-bug: lp-923257
Added line end (capstyle) menu for the line type dialog

Handling of the menu is similar to handling of the line type menu.
Important: In order to have it working I have had to change OBJECT_END
  type definition.
'optionmenu' variable name is changed to 'type_menu' to distinguish
between it and the 'end_menu'.
Use appropriate line end to display different objects

Use available code for dashed lines in cairo_gschem.c.
For others I've made special functions to convert value set by
'output-capstyle' option for gschem (LINE_END <-> CAPSTYLE). Now this
option is also used to display objects. It's done to have no difference
between screen view and Postscript output. That is I want to have
'WYSIWYG' possibility.  I use the same default style of all objects'
line ends (excluding buses).
Printing using capstyle corresponding to object line end

Use correct capstyle for each object instead of using one capstyle for
all objects.
Changed printing functions for of different objects. Added reasonable
defaults in some cases:
  square caps for buses (as used for line ends displaying)
  butt caps for solid circles and for hatches
  default caps (from output-capstyle option) for nets and pins
  default caps (from line ends) for arcs, boxes, circles, and lines
Additionally fixed lines' capstyle of placeholder for missing picture.
libgeda: fixed Postscript output of dots for some line types
Add an option to automatically choose portrait/landscape

To choose portrait or landscape for a schematic the printing function
relies upon its X and Y dimensions. If the dimensions are
equal, landscape is chosen as more often used layout.

Closes-bug: lp-722347
Fixed wrong behaviour during gschem navigation

If you go down the same symbol during navigation from different places
you always come back to the schematic where you've done this first. This
patch fixes such a wrong behaviour.

Closes-bug: lp-698543
libgeda: Fix uninitialised scalar variables.

Coverity-ID: 201659
Coverity-ID: 201660
Coverity-ID: 201661
Coverity-ID: 201662
Coverity-ID: 201663
Coverity-ID: 201664
Coverity-ID: 201665
libgeda: Fix resource leak in f_print_header().

f_print_header() leaked a file pointer to the PostScript prolog file.

Coverity-ID: 201627
libgeda: Fix buffer overrun in s_menu_return_entry().

Off-by-one error.

Coverity-ID: 201626
gschem: Fix buffer overruns in buffer handling code.

Off-by-one errors.

Coverity-ID: 201623
Coverity-ID: 201624
Coverity-ID: 201625
libgeda: Fix dereferences before NULL checks.

Coverity-ID: 201630
Coverity-ID: 201629
libgeda: Fix comparison of array with NULL.

Comparing arrays to NULL has no effect.

Coverity-ID: 201622
gnetlist: Fix missing break in switch.

This was clearly an error, since in the APPEND case the built value
would would be leaked.

Coverity-ID: 201618
libgeda: Fix dereferences after NULL checks.

In some cases, it is actually correct to *remove* the NULL checks,
since the functions in question are internal libgeda implementations
and can assume that the caller has sanity checked arguments.

Coverity-ID: 201604
Coverity-ID: 201605
Coverity-ID: 201606
Coverity-ID: 201607
Coverity-ID: 201608
Coverity-ID: 201609
Coverity-ID: 201610
Coverity-ID: 201611
libgeda: Fix explicit NULL dereference.

When printing a text OBJECT with an invalid show_name_value field,
o_text_print() could dereference NULL.  Adding a default case to the
switch statement should fix this.

Coverity-ID: 201603
gschem: Fix dereference after NULL check.

In o_undo_savestate(), we assume that u_current must be non-NULL.
Make this explicit by adding an assertion.

Coverity-ID: 201602
gnetlist: Fix dereference after NULL check.

Replace the NULL check with an assertion.

Coverity-ID: 201601
libgeda: Fix explicit NULL dereference.

In s_hierarchy_down_schematic_single(), NULL may be dereferenced if an
invalid flag argument is passed to the function.  Adding a default
branch to the switch statement should resolve this.

Coverity-ID: 201600