Code Monkey home page Code Monkey logo

cobcurses's People

Contributors

ve3wwg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cobcurses's Issues

Invalid MOVE statement & Ignoring SYNCHRONIZED on libcobcurses.cob

When I compile cobcurses under linux (Ubuntu 16.04 amd64) with OpenCobol 2.0, I got the following error.
Maybe my mistake, but I don't know where to look at.
I appreciate any suggestion you can make.
Thanks.

cobc -b -Wall -Wno-call-params  -std=cobol85 -I../copybk -free libcobcurses.cob cobcurses.o terminal.o term_curses.o term_curses_conv.o term_curses_menu.o cc_menu.o environ.o misc.o dynstr.o pathname.o fcomp2.o ecomp1.o ecomp2.o expon.o ecvt.o units.o eunits.o enumber.o cobmenu.o cobtrace.o -L/usr/local/lib  -lncurses
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
libcobcurses.cob: In paragraph 'NC-3270-UP':
libcobcurses.cob: 2057: Error: Invalid MOVE statement
libcobcurses.cob: 2057: Error: Invalid MOVE statement
libcobcurses.cob: In paragraph 'NC-3270-NEXT':
libcobcurses.cob: 2076: Error: Invalid MOVE statement
libcobcurses.cob: 2076: Error: Invalid MOVE statement
libcobcurses.cob: In paragraph 'NC-3270-TAB':
libcobcurses.cob: 2094: Error: Invalid MOVE statement
libcobcurses.cob: 2094: Error: Invalid MOVE statement
libcobcurses.cob: In paragraph 'NC-3270-TAB-EQ':
libcobcurses.cob: 2205: Error: Invalid MOVE statement
libcobcurses.cob: 2205: Error: Invalid MOVE statement
libcobcurses.cob: In paragraph 'NC-3270-BTAB':
libcobcurses.cob: 2237: Error: Invalid MOVE statement
libcobcurses.cob: 2237: Error: Invalid MOVE statement
libcobcurses.cob: In paragraph 'NC-3270-BTAB-EQ':
libcobcurses.cob: 2305: Error: Invalid MOVE statement
libcobcurses.cob: 2305: Error: Invalid MOVE statement
libcobcurses.cob: 78: Warning: Ignoring SYNCHRONIZED for group item 'FILLER'
Makefile:449: recipe for target 'libcobcurses.so' failed
make: *** [libcobcurses.so] Error 1

FR: remove non-standard OCCURS n TO m without DEPENDING item

As noted in #1 there is an issue in at least https://github.com/ve3wwg/cobcurses/blob/master/src/copybk/COBCURSL.cbl:

../copybk/COBCURSL.cbl:47: error: TO phrase without DEPENDING phrase
../copybk/COBCURSL.cbl:53: error: TO phrase without DEPENDING phrase
../copybk/COBCURSL.cbl:110: error: TO phrase without DEPENDING phrase
       01   NC-FKEY-EXEMPTIONS.
            10  NC-FKEY-DEFN OCCURS 1 TO 12 TIMES.
                20 NC-FKEY-EXEMPT         PIC X.

The COBOL standard says it should either have a DEPENDING item or the 1 TO dropped (which is what IBM COBOL and cobc -std=ibm / cobc -fodo-without-to=ok do - therefore there is no urgent need to change) it.

Summary:
The source is valid on IBM but as it is an extension that has no real use and because other compilers may not support this I suggest to drop it in any places used (and would open a PR after the possible recreation of the repo - #2).

Makefiles should not specify -std=cobol85

As mentioned by @jlturriff in #1 GnuCOBOL 2+ refuses to compile the COBOL sources.

The reason for the messages like

cobc -b -Wall -Wno-call-params -std=cobol85 -I../copybk -free libcobcurses.cob cobcurses.o terminal.o term_curses.o term_curses_conv.o term_curses_menu.o cc_menu.o environ.o misc.o dynstr.o pathname.o fcomp2.o ecomp1.o ecomp2.o expon.o ecvt.o units.o eunits.o enumber.o cobmenu.o cobtrace.o -L/usr/local/lib64 -lncurses
libcobcurses.cob:20: error: syntax error, unexpected Identifier, expecting EXTERNAL or EXTERNAL-FORM or GLOBAL or IDENTIFIED
libcobcurses.cob:21: error: syntax error, unexpected Identifier
../copybk/COBCURSG.cbl:12: error: syntax error, unexpected Identifier, expecting EXTERNAL or EXTERNAL-FORM or GLOBAL or IDENTIFIED
../copybk/COBCURSG.cbl:14: error: syntax error, unexpected Identifier, expecting EXTERNAL or EXTERNAL-FORM or GLOBAL or IDENTIFIED

is quite simple:

neither COMP-5 nor POINTER, nor PROGRAM-POINTER, ... are defined in COBOL 1985.

One of the big changes between OpenCOBOL/GnuCOBOL 1.1 and GnuCOBOL 2.2 is that GnuCOBOL 2.2+ take you serious when you specify that you want to do COBOL85 only and not use any other features (including reserved words and therefore USAGEs, too) that are not available in the chosen std.

You could add these specific words on the command line with a "single" option:

cobc -std=cobol85 -freserved=COMP-5,POINTER,PROGRAM-POINTER prog.cob

or add all available reserved words:

cobc -std=cobol85 -freserved-words=default prog.cob

but you likely don't want to go this route.

From the sources it is obvious that these are not written for COBOL85 (or any other standard COBOL dialect), therefore I suggest to remove the -std from the Makefiles completely and only remove possible offending words like

-fnot-reserved=HANDLE,NOTHING

But in this case the flags for COBC should be version specifc, could be included in the makefile either depending on a passed flag or on the value of something like

cobc_version := $(shell cobc -V | head -n1 | cut -d" " -f3)

@ve3wwg What do you think about this?

Push releases to Github, possibly re-creating the git repository

Instead of https://github.com/ve3wwg/cobcurses/tree/master/releases as these should be found at https://github.com/ve3wwg/cobcurses/releases

The way GitHub works this could be done by tagging the initial import (I guess this is the 0.96 release) and adding the release tarball afterwards, including a nice user-summary for the changes done in 0.96.

I personally would prefer to have older versions available, too (both in release and in source form) but this would mean to recreate the repository from the SF cvs repo and redo the commits that were done later.

I personally would convert it from cvs to svn, then add the commits found here, apply a temporary svn hook to be able to change any property, change the author and date to be identical to the ones found in this repo, add tags for versions if missing, then convert the repo to git and finally push-force it to GitHub (this means everybody that checked-out from here would have to do it again as the repo hash changes, but as the repo here as not many commits yet and there are no "official" forks here I'd still consider it and actually would help doing these changes if you want me to.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.