[Scummvm-git-logs] scummvm master -> 47e4c3c10cf6a9d57f58d714486072b4e892e560

digitall noreply at scummvm.org
Tue Mar 8 09:55:18 UTC 2022


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a8cbc397af GLK: ALAN2: Fix Redundant Declarations
47e4c3c10c GLK: TADS: Fix Redundant Declarations


Commit: a8cbc397af8dcf28bb7ab3adf8264962f834d676
    https://github.com/scummvm/scummvm/commit/a8cbc397af8dcf28bb7ab3adf8264962f834d676
Author: D G Turner (digitall at scummvm.org)
Date: 2022-03-08T09:53:42Z

Commit Message:
GLK: ALAN2: Fix Redundant Declarations

These cause GCC Warnings when -Wredundant-decls is passed.

Changed paths:
    engines/glk/alan2/exe.h


diff --git a/engines/glk/alan2/exe.h b/engines/glk/alan2/exe.h
index 13f780255fc..b78cb32367e 100644
--- a/engines/glk/alan2/exe.h
+++ b/engines/glk/alan2/exe.h
@@ -40,7 +40,6 @@ extern int dscrstkp;        /* Point into describe stack */
 extern void sys(Aword fpos, Aword len);
 extern Boolean confirm(MsgKind msgno);
 extern Aptr attribute(Aword item, Aword atr);
-extern void say(Aword item);
 extern void saynum(Aword num);
 extern void saystr(char *str);
 extern Aptr strattr(Aword id, Aword atr);


Commit: 47e4c3c10cf6a9d57f58d714486072b4e892e560
    https://github.com/scummvm/scummvm/commit/47e4c3c10cf6a9d57f58d714486072b4e892e560
Author: D G Turner (digitall at scummvm.org)
Date: 2022-03-08T09:54:22Z

Commit Message:
GLK: TADS: Fix Redundant Declarations

These cause GCC Warnings when -Wredundant-decls is passed.

Changed paths:
    engines/glk/tads/os_frob_tads.cpp
    engines/glk/tads/tads2/run.h
    engines/glk/tads/tads2/text_io.h


diff --git a/engines/glk/tads/os_frob_tads.cpp b/engines/glk/tads/os_frob_tads.cpp
index 9c1aceab39b..6cf1abb30b1 100644
--- a/engines/glk/tads/os_frob_tads.cpp
+++ b/engines/glk/tads/os_frob_tads.cpp
@@ -286,190 +286,5 @@ bool os_is_file_in_dir(const char *filename, const char *path,
 	return Common::File::exists(filename);
 }
 
-
-
-/* ------------------------------------------------------------------------ */
-/*
-*   Convert an OS filename path to URL-style format.  This isn't a true URL
-*   conversion; rather, it simply expresses a filename in Unix-style
-*   notation, as a series of path elements separated by '/' characters.
-*   Unlike true URLs, we don't use % encoding or a scheme prefix (file://,
-*   etc).
-*
-*   The result path never ends in a trailing '/', unless the entire result
-*   path is "/".  This is for consistency; even if the source path ends with
-*   a local path separator, the result doesn't.
-*
-*   If the local file system syntax uses '/' characters as ordinary filename
-*   characters, these must be replaced with some other suitable character in
-*   the result, since otherwise they'd be taken as path separators when the
-*   URL is parsed.  If possible, the substitution should be reversible with
-*   respect to os_cvt_dir_url(), so that the same URL read back in on this
-*   same platform will produce the same original filename.  One particular
-*   suggestion is that if the local system uses '/' to delimit what would be
-*   a filename extension on other platforms, replace '/' with '.', since
-*   this will provide reversibility as well as a good mapping if the URL is
-*   read back in on another platform.
-*
-*   The local equivalents of "." and "..", if they exist, are converted to
-*   "." and ".." in the URL notation.
-*
-*   Examples:
-*
-*.   Windows: images\rooms\startroom.jpg -> images/rooms/startroom.jpg
-*.   Windows: ..\startroom.jpg -> ../startroom.jpg
-*.   Mac:     :images:rooms:startroom.jpg -> images/rooms/startroom.jpg
-*.   Mac:     ::startroom.jpg -> ../startroom.jpg
-*.   VMS:     [.images.rooms]startroom.jpg -> images/rooms/startroom.jpg
-*.   VMS:     [-.images]startroom.jpg -> ../images/startroom.jpg
-*.   Unix:    images/rooms/startroom.jpg -> images/rooms/startroom.jpg
-*.   Unix:    ../images/startroom.jpg -> ../images/startroom.jpg
-*
-*   If the local name is an absolute path in the local file system (e.g.,
-*   Unix /file, Windows C:\file), translate as follows.  If the local
-*   operating system uses a volume or device designator (Windows C:, VMS
-*   SYS$DISK:, etc), make the first element of the path the exact local
-*   syntax for the device designator: /C:/ on Windows, /SYS$DISK:/ on VMS,
-*   etc.  Include the local syntax for the device prefix.  For a system like
-*   Unix with a unified file system root ("/"), simply start with the root
-*   directory.  Examples:
-*
-*.    Windows:  C:\games\deep.gam         -> /C:/games/deep.gam
-*.    Windows:  C:games\deep.gam          -> /C:./games/deep.gam
-*.    Windows:  \\SERVER\DISK\games\deep.gam -> /\\SERVER/DISK/games/deep.gam
-*.    Mac OS 9: Hard Disk:games:deep.gam  -> /Hard Disk:/games/deep.gam
-*.    VMS:      SYS$DISK:[games]deep.gam  -> /SYS$DISK:/games/deep.gam
-*.    Unix:     /games/deep.gam           -> /games/deep.gam
-*
-*   Rationale: it's effectively impossible to create a truly portable
-*   representation of an absolute path.  Operating systems are too different
-*   in the way they represent root paths, and even if that were solvable, a
-*   root path is essentially unusable across machines anyway because it
-*   creates a dependency on the contents of a particular machine's disk.  So
-*   if we're called upon to translate an absolute path, we can forget about
-*   trying to be truly portable and instead focus on round-trip fidelity -
-*   i.e., making sure that applying os_cvt_url_dir() to our result recovers
-*   the exact original path, assuming it's done on the same operating
-*   system.  The approach outlined above should achieve round-trip fidelity
-*   when a local path is converted to a URL and back on the same machine,
-*   since the local URL-to-path converter should recognize its own special
-*   type of local absolute path prefix.  It also produces reasonable results
-*   on other platforms - see the os_cvt_url_dir() comments below for
-*   examples of the decoding results for absolute paths moved to new
-*   platforms.  The result when a device-rooted absolute path is encoded on
-*   one machine and then decoded on another will generally be a local path
-*   with a root on the default device/volume and an outermost directory with
-*   a name based on the original machine's device/volume name.  This
-*   obviously won't reproduce the exact original path, but since that's
-*   impossible anyway, this is probably as good an approximation as we can
-*   create.
-*
-*   Character sets: the input could be in local or UTF-8 character sets.
-*   The implementation shouldn't care, though - just treat bytes in the
-*   range 0-127 as plain ASCII, and everything else as opaque.  I.e., do not
-*   quote or otherwise modify characters outside the 0-127 range.
-*/
-void os_cvt_dir_url(char *result_buf, size_t result_buf_size,
-	const char *src_path);
-
-/*
-*   Convert a URL-style path into a filename path expressed in the local
-*   file system's syntax.  Fills in result_buf with a file path, constructed
-*   using the local file system syntax, that corresponds to the path in
-*   src_url expressed in URL-style syntax.  Examples:
-*
-*   images/rooms/startroom.jpg ->
-*.   Windows   -> images\rooms\startroom.jpg
-*.   Mac OS 9  -> :images:rooms:startroom.jpg
-*.   VMS       -> [.images.rooms]startroom.jpg
-*
-*   The source format isn't a true URL; it's simply a series of path
-*   elements separated by '/' characters.  Unlike true URLs, our input
-*   format doesn't use % encoding and doesn't have a scheme (file://, etc).
-*   (Any % in the source is treated as an ordinary character and left as-is,
-*   even if it looks like a %XX sequence.  Anything that looks like a scheme
-*   prefix is left as-is, with any // treated as path separators.
-*
-*   images/file%20name.jpg ->
-*.   Windows   -> images\file%20name.jpg
-*
-*   file://images/file.jpg ->
-*.   Windows   -> file_\\images\file.jpg
-*
-*   Any characters in the path that are invalid in the local file system
-*   naming rules are converted to "_", unless "_" is itself invalid, in
-*   which case they're converted to "X".  One exception is that if '/' is a
-*   valid local filename character (rather than a path separator as it is on
-*   Unix and Windows), it can be used as the replacement for the character
-*   that os_cvt_dir_url uses as its replacement for '/', so that this
-*   substitution is reversible when a URL is generated and then read back in
-*   on this same platform.
-*
-*   images/file:name.jpg ->
-*.   Windows   -> images\file_name.jpg
-*.   Mac OS 9  -> :images:file_name.jpg
-*.   Unix      -> images/file:name.jpg
-*
-*   The path elements "." and ".." are specifically defined as having their
-*   Unix meanings: "." is an alias for the preceding path element, or the
-*   working directory if it's the first element, and ".." is an alias for
-*   the parent of the preceding element.  When these appear as path
-*   elements, this routine translates them to the appropriate local
-*   conventions.  "." may be translated simply by removing it from the path,
-*   since it reiterates the previous path element.  ".." may be translated
-*   by removing the previous element - HOWEVER, if ".." appears as the first
-*   element, it has to be retained and translated to the equivalent local
-*   notation, since it will have to be applied later, when the result_buf
-*   path is actually used to open a file, at which point it will combined
-*   with the working directory or another base path.
-*
-*.  /images/../file.jpg -> [Windows] file.jpg
-*.  ../images/file.jpg ->
-*.   Windows  -> ..\images\file.jpg
-*.   Mac OS 9 -> ::images:file.jpg
-*.   VMS      -> [-.images]file.jpg
-*
-*   If the URL path is absolute (starts with a '/'), the routine inspects
-*   the path to see if it was created by the same OS, according to the local
-*   rules for converting absolute paths in os_cvt_dir_url() (see).  If so,
-*   we reverse the encoding done there.  If it doesn't appear that the name
-*   was created by the same operating system - that is, if reversing the
-*   encoding doesn't produce a valid local filename - then we create a local
-*   absolute path as follows.  If the local system uses device/volume
-*   designators, we start with the current working device/volume or some
-*   other suitable default volume.  We then add the first element of the
-*   path, if any, as the root directory name, applying the usual "_" or "X"
-*   substitution for any characters that aren't allowed in local names.  The
-*   rest of the path is handled in the usual fashion.
-*
-*.  /images/file.jpg ->
-*.    Windows -> \images\file.jpg
-*.    Unix    -> /images/file.jpg
-*
-*.  /c:/images/file.jpg ->
-*.    Windows -> c:\images\file.jpg
-*.    Unix    -> /c:/images/file.jpg
-*.    VMS     -> SYS$DISK:[c__.images]file.jpg
-*
-*.  /Hard Disk:/images/file.jpg ->
-*.    Windows -> \Hard Disk_\images\file.jpg
-*.    Unix    -> SYS$DISK:[Hard_Disk_.images]file.jpg
-*
-*   Note how the device/volume prefix becomes the top-level directory when
-*   moving a path across machines.  It's simply not possible to reconstruct
-*   the exact original path in such cases, since device/volume syntax rules
-*   have little in common across systems.  But this seems like a good
-*   approximation in that (a) it produces a valid local path, and (b) it
-*   gives the user a reasonable basis for creating a set of folders to mimic
-*   the original source system, if they want to use that approach to port
-*   the data rather than just changing the paths internally in the source
-*   material.
-*
-*   Character sets: use the same rules as for os_cvt_dir_url().
-*/
-void os_cvt_url_dir(char *result_buf, size_t result_buf_size,
-	const char *src_url);
-
-
 } // End of namespace TADS
 } // End of namespace Glk
diff --git a/engines/glk/tads/tads2/run.h b/engines/glk/tads/tads2/run.h
index 260fb378ace..7ee4e331a7a 100644
--- a/engines/glk/tads/tads2/run.h
+++ b/engines/glk/tads/tads2/run.h
@@ -367,10 +367,6 @@ void runsign(runcxdef *ctx, int err);
 /* draw status line */
 void runstat();
 
-/* initialize output status */
-void runistat(struct voccxdef *vctx, struct runcxdef *rctx,
-			  struct tiocxdef *tctx);
-
 } // End of namespace TADS2
 } // End of namespace TADS
 } // End of namespace Glk
diff --git a/engines/glk/tads/tads2/text_io.h b/engines/glk/tads/tads2/text_io.h
index 5d074b5440f..090418d99a3 100644
--- a/engines/glk/tads/tads2/text_io.h
+++ b/engines/glk/tads/tads2/text_io.h
@@ -154,9 +154,6 @@ void outblank(void);
 /* start/end watchpoint evaluation */
 void outwx(int flag);
 
-/* Begin/end capturing */
-void tiocapture(tiocxdef *tioctx, mcmcxdef *memctx, int flag);
-
 /* clear all captured output */
 void tioclrcapture(tiocxdef *tioctx);
 
@@ -166,12 +163,6 @@ void tioclrcapture(tiocxdef *tioctx);
  */
 void tiopopcapture(tiocxdef *tioctx, uint orig_size);
 
-/* get the object handle of the captured output */
-mcmon tiogetcapture(tiocxdef *ctx);
-
-/* get the amount of text captured */
-uint tiocapturesize(tiocxdef *ctx);
-
 /* turn MORE mode on or off */
 int setmore(int state);
 




More information about the Scummvm-git-logs mailing list