Browse Source

Compilation repairs


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/arts@1212131 283d02a7-25f6-0310-bc7c-ecb5cbfe19
tags/v3.5.13
tpearson 8 years ago
parent
commit
6637c74227
66 changed files with 192 additions and 180 deletions
  1. 1
    1
      artsc/artsc.h
  2. 4
    2
      artsc/artsdsp.c
  3. 2
    2
      doc/TODO
  4. 1
    1
      examples/testdhandle.cc
  5. 1
    1
      flow/asyncschedule.h
  6. 1
    1
      flow/audioio.h
  7. 1
    1
      flow/audiomanager_impl.cc
  8. 1
    1
      flow/audiosubsys.h
  9. 1
    1
      flow/bufferqueue.h
  10. 1
    1
      flow/bus.h
  11. 1
    1
      flow/cache.h
  12. 2
    2
      flow/cachedwav.h
  13. 2
    2
      flow/convert.h
  14. 1
    1
      flow/cpuinfo.h
  15. 1
    1
      flow/fft.h
  16. 1
    1
      flow/gslschedule.h
  17. 1
    1
      flow/pipebuffer.h
  18. 1
    1
      flow/resample.h
  19. 1
    1
      flow/stdsynthmodule.h
  20. 0
    2
      flow/synthschedule.h
  21. 1
    1
      flow/virtualports.h
  22. 1
    1
      gmcop/giomanager.h
  23. 1
    1
      mcop/anyref.h
  24. 1
    1
      mcop/asyncstream.h
  25. 1
    1
      mcop/buffer.h
  26. 1
    1
      mcop/common.h
  27. 1
    1
      mcop/connect.h
  28. 1
    1
      mcop/connection.h
  29. 1
    1
      mcop/datapacket.h
  30. 1
    1
      mcop/debug.h
  31. 1
    1
      mcop/delayedreturn.h
  32. 1
    1
      mcop/dispatcher.h
  33. 1
    1
      mcop/dynamicrequest.h
  34. 1
    1
      mcop/dynamicskeleton.h
  35. 1
    1
      mcop/extensionloader.h
  36. 1
    1
      mcop/factory.h
  37. 1
    1
      mcop/flowsystem.h
  38. 1
    1
      mcop/idlfilereg.h
  39. 1
    1
      mcop/ifacerepo_impl.h
  40. 1
    1
      mcop/iomanager.h
  41. 1
    1
      mcop/loopback.h
  42. 1
    1
      mcop/mcopconfig.h
  43. 108
    103
      mcop/mcoputils.cc
  44. 1
    1
      mcop/mcoputils.h
  45. 1
    1
      mcop/md5.h
  46. 1
    1
      mcop/md5auth.h
  47. 1
    1
      mcop/namedstore.h
  48. 1
    1
      mcop/notification.h
  49. 1
    1
      mcop/object.h
  50. 1
    1
      mcop/objectmanager.h
  51. 1
    1
      mcop/pool.h
  52. 1
    1
      mcop/reference.h
  53. 1
    1
      mcop/referenceclean.h
  54. 1
    1
      mcop/socketconnection.h
  55. 1
    1
      mcop/startupmanager.h
  56. 1
    1
      mcop/tcpconnection.h
  57. 1
    1
      mcop/tcpserver.h
  58. 1
    1
      mcop/thread.h
  59. 1
    1
      mcop/type.h
  60. 1
    1
      mcop/unixconnection.h
  61. 1
    1
      mcop/unixserver.h
  62. 1
    1
      mcop/weakreference.h
  63. 1
    1
      qtmcop/qiomanager.h
  64. 1
    1
      qtmcop/qiomanager_p.h
  65. 4
    3
      soundserver/artsd.cc
  66. 12
    6
      soundserver/artsplay.cc

+ 1
- 1
artsc/artsc.h View File

@@ -35,7 +35,7 @@ extern "C" {
35 35
  * The aRts plain C API aims at easily writing/porting plain C apps to the
36 36
  * arts sound server. What is provided is streaming functionality, in a
37 37
  * blocking way. So for most apps, you simply remove the few system calls
38
- * that deal with your audio device, and tqreplace them with the appropriate
38
+ * that deal with your audio device, and replace them with the appropriate
39 39
  * arts calls.
40 40
  */
41 41
 

+ 4
- 2
artsc/artsdsp.c View File

@@ -37,7 +37,9 @@
37 37
 #include <sys/ioctl.h>
38 38
 #include <sys/stat.h>
39 39
 /* #include <sys/mman.h> */
40
+#define open ignore_system_open
40 41
 #include <fcntl.h>
42
+#undef open
41 43
 
42 44
 #include <artsc.h>
43 45
 #include <dlfcn.h>
@@ -58,10 +60,10 @@
58 60
  * which points to /dev/null, to ensure compatibility with more weird
59 61
  * operations on streams
60 62
  *
61
- * settings tqcontains what has already been set (speed, bits, channels), and
63
+ * settings contains what has already been set (speed, bits, channels), and
62 64
  * is 7 when all of these are true
63 65
  *
64
- * stream tqcontains an aRts stream or 0
66
+ * stream contains an aRts stream or 0
65 67
  */
66 68
 static int sndfd = -1;
67 69
 static int settings;

+ 2
- 2
doc/TODO View File

@@ -4,7 +4,7 @@
4 4
      dynamically loaded modules
5 5
 - get rid of all error handling done by assert ; thus, one by one review
6 6
   each assert if it can happen under any circumstances if yes, it needs
7
-  to be tqreplaced by some other mechanism
7
+  to be replaced by some other mechanism
8 8
 - report errors properly if some component could not be loaded ; right
9 9
   now, it fails within assert(skel) in generated code, which doesn't
10 10
   help users much to debug the problem
@@ -128,7 +128,7 @@
128 128
   can be restored on next login (or per song or something like that)
129 129
 - edit .arts-map files visually
130 130
 
131
-## Optimization (this section tqcontains various optimization ideas)
131
+## Optimization (this section contains various optimization ideas)
132 132
 
133 133
 - use no floats for adressing the fractional part in resampling but integers
134 134
   (that will be MUCH faster)

+ 1
- 1
examples/testdhandle.cc View File

@@ -58,7 +58,7 @@ int main(int argc, char **argv)
58 58
 			" (" << gsl_strerror(info.error()) << ") while loading info.\n";
59 59
 		exit(1);
60 60
 	}
61
-	cout << "file tqcontains " << info.waveCount() << " waves:\n";
61
+	cout << "file contains " << info.waveCount() << " waves:\n";
62 62
 	for(int i=0; i<info.waveCount(); i++)
63 63
 	{
64 64
 		GSL::WaveDescription desc= info.waveDescription(i);

+ 1
- 1
flow/asyncschedule.h View File

@@ -30,7 +30,7 @@
30 30
 #include <queue>
31 31
 
32 32
 /*
33
- * BC - tqStatus (2002-03-08): ASyncNetSend, ASyncNetReceive, ASyncPort.
33
+ * BC - Status (2002-03-08): ASyncNetSend, ASyncNetReceive, ASyncPort.
34 34
  *
35 35
  * None of these classes is considered part of the public API. Do NOT use it
36 36
  * in your apps. These are part of the implementation of libartsflow's

+ 1
- 1
flow/audioio.h View File

@@ -27,7 +27,7 @@
27 27
 #include <string>
28 28
 #include "arts_export.h"
29 29
 /*
30
- * BC - tqStatus (2002-03-08): AudioIO, AudioIOFactory
30
+ * BC - Status (2002-03-08): AudioIO, AudioIOFactory
31 31
  *
32 32
  * Right now, these classes are considered an implementation detail. No binary
33 33
  * compatibility guaranteed, its safe to add virtual methods when required.

+ 1
- 1
flow/audiomanager_impl.cc View File

@@ -45,7 +45,7 @@ public:
45 45
    a typedef in between, which makes it magically work.
46 46
    We could also use an explicit instantiation, but this is not allowed
47 47
    on all C++ compilers in this scope.  Note also, that we don't need
48
-   to tqreplace _all_ occurrences of list<xxx*> below, only the two in the
48
+   to replace _all_ occurrences of list<xxx*> below, only the two in the
49 49
    member declaration.  What a mess.  */
50 50
 typedef list<AudioManagerClient_impl *> L_AMC;
51 51
 typedef list<AudioManagerAssignable *> L_AMA;

+ 1
- 1
flow/audiosubsys.h View File

@@ -29,7 +29,7 @@
29 29
 #include "startupmanager.h"
30 30
 
31 31
 /*
32
- * BC - tqStatus (2002-03-08): AudioSubSystem, ASProducer, ASConsumer.
32
+ * BC - Status (2002-03-08): AudioSubSystem, ASProducer, ASConsumer.
33 33
  *
34 34
  * These classes are kept binary compatible. You can rely on them.
35 35
  * AudioSubSystem has a private data pointer to do so. Even if ports to

+ 1
- 1
flow/bufferqueue.h View File

@@ -1,5 +1,5 @@
1 1
 /*
2
- * BC - tqStatus (2002-03-08): ByteBuffer, BufferQueue
2
+ * BC - Status (2002-03-08): ByteBuffer, BufferQueue
3 3
  *
4 4
  * None of these classes is considered part of the public API. Do NOT use it
5 5
  * in your apps. These are part of the implementation of libartsflow's

+ 1
- 1
flow/bus.h View File

@@ -27,7 +27,7 @@
27 27
 #include "artsflow.h"
28 28
 
29 29
 /*
30
- * BC - tqStatus (2002-03-08): BusClient, BusManager
30
+ * BC - Status (2002-03-08): BusClient, BusManager
31 31
  *
32 32
  * None of these classes is considered part of the public API. Do NOT use it
33 33
  * in your apps. These are part of the implementation of libartsflow's

+ 1
- 1
flow/cache.h View File

@@ -30,7 +30,7 @@
30 30
 #include "arts_export.h"
31 31
 
32 32
 /*
33
- * BC - tqStatus (2002-03-08): Cache, CachedObject
33
+ * BC - Status (2002-03-08): Cache, CachedObject
34 34
  *
35 35
  * At the current point in time, there are NO GUARANTEES, so only use this
36 36
  * in apps part of official KDE releases (such as kdemultimedia apps), which

+ 2
- 2
flow/cachedwav.h View File

@@ -23,15 +23,15 @@
23 23
 #ifndef CACHEDWAV_H
24 24
 #define CACHEDWAV_H
25 25
 
26
-#include "config.h"
27 26
 #include "arts_export.h"
27
+
28 28
 #ifdef HAVE_LIBAUDIOFILE
29 29
 #include "cache.h"
30 30
 #include <sys/stat.h>
31 31
 #include <unistd.h>
32 32
 
33 33
 /*
34
- * BC - tqStatus (2002-03-08): CachedWav.
34
+ * BC - Status (2002-03-08): CachedWav.
35 35
  *
36 36
  * At the current point in time, there are NO GUARANTEES, so only use this
37 37
  * in apps part of official KDE releases (such as kdemultimedia apps), which

+ 2
- 2
flow/convert.h View File

@@ -26,7 +26,7 @@
26 26
 #include "arts_export.h"
27 27
 
28 28
 /*
29
- * BC - tqStatus (2002-03-08): conversion functions
29
+ * BC - Status (2002-03-08): conversion functions
30 30
  *
31 31
  * None of them will be removed or changed, so it is safe to use them in
32 32
  * your apps. It is *recommended* (though not necessary) to use the new
@@ -48,7 +48,7 @@ namespace Arts {
48 48
  *  float for float data between -1 and 1
49 49
  *
50 50
  * and may be prefixed by 2 to indicate that stereo is done with two seperate
51
- * buffers or i to indicate interleaved stereo (one buffer which tqcontains
51
+ * buffers or i to indicate interleaved stereo (one buffer which contains
52 52
  * one sample left, one sample right, one sample left etc.)
53 53
  *
54 54
  * The parameter speed (for interpolations) is *not* the samplingrate, but

+ 1
- 1
flow/cpuinfo.h View File

@@ -24,7 +24,7 @@
24 24
 
25 25
 #include "arts_export.h"
26 26
 /*
27
- * BC - tqStatus (2002-03-08): CpuInfo
27
+ * BC - Status (2002-03-08): CpuInfo
28 28
  *
29 29
  * This class will be kept binary compatible - it just exports the static
30 30
  * CpuInfo::flags() function as only functionality.

+ 1
- 1
flow/fft.h View File

@@ -2,7 +2,7 @@
2 2
 #define ARTS_FFT_H
3 3
 
4 4
 /*
5
- * BC - tqStatus (2002-03-08): arts_fft_float
5
+ * BC - Status (2002-03-08): arts_fft_float
6 6
  *
7 7
  * This fft interface should be obsoleted in the future in favour of one
8 8
  * exploiting the capabilities of gsl fully. However, it will be kept binary

+ 1
- 1
flow/gslschedule.h View File

@@ -30,7 +30,7 @@
30 30
 #include <list>
31 31
 
32 32
 /*
33
- * BC - tqStatus (2002-03-08): Port, AudioPort, MultiPort, StdFlowSystem,
33
+ * BC - Status (2002-03-08): Port, AudioPort, MultiPort, StdFlowSystem,
34 34
  *                           StdScheduleNode
35 35
  *
36 36
  * None of these classes is considered part of the public API. Do NOT use it

+ 1
- 1
flow/pipebuffer.h View File

@@ -24,7 +24,7 @@
24 24
 #define __PIPEBUFFER_H__
25 25
 
26 26
 /*
27
- * BC - tqStatus (2002-03-08): PipeSegment, PipeBuffer
27
+ * BC - Status (2002-03-08): PipeSegment, PipeBuffer
28 28
  *
29 29
  * None of these classes is considered part of the public API. Do NOT use it
30 30
  * in your apps. These are part of the implementation of libartsflow's

+ 1
- 1
flow/resample.h View File

@@ -27,7 +27,7 @@
27 27
 #include "arts_export.h"
28 28
 
29 29
 /*
30
- * BC - tqStatus (2002-03-08): Resampler / Refiller.
30
+ * BC - Status (2002-03-08): Resampler / Refiller.
31 31
  *
32 32
  * These classes will be kept binary compatible. Resampler has a private
33 33
  * data pointer for this purpose.

+ 1
- 1
flow/stdsynthmodule.h View File

@@ -27,7 +27,7 @@
27 27
 #include "artsflow.h"
28 28
 
29 29
 /*
30
- * BC - tqStatus (2002-03-08): StdSynthModule
30
+ * BC - Status (2002-03-08): StdSynthModule
31 31
  *
32 32
  * This class is intended for public use (inheritance) as it supplies a base
33 33
  * for all objects using streams. It will be kept binary compatible.

+ 0
- 2
flow/synthschedule.h View File

@@ -23,8 +23,6 @@
23 23
 #ifndef SYNTHSCHEDULE_H
24 24
 #define SYNTHSCHEDULE_H
25 25
 
26
-#include "config.h"
27
-
28 26
 #ifdef __GNUC__
29 27
 #warning " *   <synthschedule.h> included!   *"
30 28
 #warning " * include <gslschedule.h> instead *"

+ 1
- 1
flow/virtualports.h View File

@@ -28,7 +28,7 @@
28 28
 #include <list>
29 29
 
30 30
 /*
31
- * BC - tqStatus (2002-03-08): VPortConnection, VPort.
31
+ * BC - Status (2002-03-08): VPortConnection, VPort.
32 32
  *
33 33
  * None of these classes is considered part of the public API. Do NOT use it
34 34
  * in your apps. These are part of the implementation of libartsflow's

+ 1
- 1
gmcop/giomanager.h View File

@@ -30,7 +30,7 @@
30 30
 #include <map>
31 31
 #include "arts_export.h"
32 32
 /*
33
- * BC - tqStatus (2002-03-08): GIOManager
33
+ * BC - Status (2002-03-08): GIOManager
34 34
  *
35 35
  * This class will be kept binary compatible (d ptr for extensions).
36 36
  */

+ 1
- 1
mcop/anyref.h View File

@@ -27,7 +27,7 @@
27 27
 #include <string>
28 28
 #include "arts_export.h"
29 29
 /*
30
- * BC - tqStatus (2002-03-08): AnyRefBase, AnyRef, AnyConstRef
30
+ * BC - Status (2002-03-08): AnyRefBase, AnyRef, AnyConstRef
31 31
  *
32 32
  * These classes will be kept binary compatibile. To change it, adding a new
33 33
  * representation is necessary. No private d pointer for this reason.

+ 1
- 1
mcop/asyncstream.h View File

@@ -28,7 +28,7 @@
28 28
 #include "datapacket.h"
29 29
 
30 30
 /*
31
- * BC - tqStatus (2002-03-08): GenericAsyncStream, AsyncStream,
31
+ * BC - Status (2002-03-08): GenericAsyncStream, AsyncStream,
32 32
  *   FloatAsyncStream/ByteAsyncStream
33 33
  *
34 34
  * These classes are to be treated with extreme care, as they are used in

+ 1
- 1
mcop/buffer.h View File

@@ -27,7 +27,7 @@
27 27
 #include <vector>
28 28
 #include "arts_export.h"
29 29
 /*
30
- * BC - tqStatus (2002-03-08): Buffer.
30
+ * BC - Status (2002-03-08): Buffer.
31 31
  *
32 32
  * Has to be kept binary compatible. As buffer is speed relevant, currently
33 33
  * there are no private d ptrs, and the idea is to keep this as possible.

+ 1
- 1
mcop/common.h View File

@@ -36,7 +36,7 @@
36 36
 #include "connect.h"
37 37
 
38 38
 /*
39
- * BC - tqStatus (2002-03-08): Read/WriteObject(Seq)
39
+ * BC - Status (2002-03-08): Read/WriteObject(Seq)
40 40
  *
41 41
  * Will be kept binary compatible by NOT TOUCHING AT ALL. Do not change this.
42 42
  * (Interaction with generated code).

+ 1
- 1
mcop/connect.h View File

@@ -22,7 +22,7 @@
22 22
 #define MCOP_CONNECT_H
23 23
 
24 24
 /*
25
- * BC - tqStatus (2002-03-08): connect / setValue functions
25
+ * BC - Status (2002-03-08): connect / setValue functions
26 26
  *
27 27
  * Will be kept as they are (binary compatible).
28 28
  */

+ 1
- 1
mcop/connection.h View File

@@ -27,7 +27,7 @@
27 27
 #include "buffer.h"
28 28
 
29 29
 /*
30
- * BC - tqStatus (2002-03-08): Connection.
30
+ * BC - Status (2002-03-08): Connection.
31 31
  *
32 32
  * None of these classes is considered part of the public API. However, they
33 33
  * NEED to be kept binary compatible as the DO interact with generated code.

+ 1
- 1
mcop/datapacket.h View File

@@ -27,7 +27,7 @@
27 27
 #include "buffer.h"
28 28
 
29 29
 /*
30
- * BC - tqStatus (2002-03-08): GenericDataChannel, DataPacket types
30
+ * BC - Status (2002-03-08): GenericDataChannel, DataPacket types
31 31
  *
32 32
  * These classes must be kept binary compatible, as the do interact with
33 33
  * generated code. So you MUST KNOW WHAT YOU ARE DOING, once you start

+ 1
- 1
mcop/debug.h View File

@@ -31,7 +31,7 @@
31 31
 #include "arts_export.h"
32 32
 
33 33
 /*
34
- * BC - tqStatus (2002-03-08): Debug.
34
+ * BC - Status (2002-03-08): Debug.
35 35
  *
36 36
  * Collection class, no instance, no members. Thus binary compatible (will
37 37
  * be kept).

+ 1
- 1
mcop/delayedreturn.h View File

@@ -26,7 +26,7 @@
26 26
 #include "arts_export.h"
27 27
 
28 28
 /*
29
- * BC - tqStatus (2002-03-08): DelayedReturn
29
+ * BC - Status (2002-03-08): DelayedReturn
30 30
  *
31 31
  * This class will be kept binary compatible. It has a private d-pointer for
32 32
  * further extensions.

+ 1
- 1
mcop/dispatcher.h View File

@@ -38,7 +38,7 @@
38 38
 #include "arts_export.h"
39 39
 
40 40
 /*
41
- * BC - tqStatus (2002-03-08): Dispatcher
41
+ * BC - Status (2002-03-08): Dispatcher
42 42
  *
43 43
  * This is part of the public API (and interacts with generated code) and
44 44
  * has to be kept binary compatible.

+ 1
- 1
mcop/dynamicrequest.h View File

@@ -31,7 +31,7 @@
31 31
 #include "arts_export.h"
32 32
 
33 33
 /*
34
- * BC - tqStatus (2002-03-08): DynamicRequest
34
+ * BC - Status (2002-03-08): DynamicRequest
35 35
  *
36 36
  * Has to be kept binary compatible (use d ptr).
37 37
  */

+ 1
- 1
mcop/dynamicskeleton.h View File

@@ -28,7 +28,7 @@
28 28
 #include "object.h"
29 29
 
30 30
 /*
31
- * BC - tqStatus (2002-03-08): DynamicSkeletonBase, DynamicSkeleton
31
+ * BC - Status (2002-03-08): DynamicSkeletonBase, DynamicSkeleton
32 32
  *
33 33
  * Will be kept binary compatible (using d ptr).
34 34
  */

+ 1
- 1
mcop/extensionloader.h View File

@@ -30,7 +30,7 @@
30 30
 #include "arts_export.h"
31 31
 
32 32
 /*
33
- * BC - tqStatus (2002-03-08): ExtensionLoader
33
+ * BC - Status (2002-03-08): ExtensionLoader
34 34
  *
35 35
  * None of these classes is considered part of the public API. Do NOT use it
36 36
  * in your apps. No binary compatibility guaranteed. (Interactions:

+ 1
- 1
mcop/factory.h View File

@@ -31,7 +31,7 @@
31 31
 #include "startupmanager.h"
32 32
 
33 33
 /*
34
- * BC - tqStatus (2002-03-08): Factory
34
+ * BC - Status (2002-03-08): Factory
35 35
  *
36 36
  * Will need to remain binary compatible (REGISTER_IMPLEMENTATION), d ptr
37 37
  * provided for convenience, watch out for interactions with generated

+ 1
- 1
mcop/flowsystem.h View File

@@ -28,7 +28,7 @@
28 28
 #include "common.h"
29 29
 
30 30
 /*
31
- * BC - tqStatus (2002-03-08): ScheduleNode, FlowSystem, FlowSystem_impl,
31
+ * BC - Status (2002-03-08): ScheduleNode, FlowSystem, FlowSystem_impl,
32 32
  *   RemoteScheduleNode
33 33
  *
34 34
  * Heavy interactions with generated and hand-written code, flowsystem binding

+ 1
- 1
mcop/idlfilereg.h View File

@@ -29,7 +29,7 @@
29 29
 #include "arts_export.h"
30 30
 
31 31
 /*
32
- * BC - tqStatus (2002-03-08): IDLFileReg
32
+ * BC - Status (2002-03-08): IDLFileReg
33 33
  *
34 34
  * Will be kept binary compatible by NOT TOUCHING AT ALL. Do not change this.
35 35
  * (Interaction with generated code). Add a new class if you need something

+ 1
- 1
mcop/ifacerepo_impl.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): InterfaceRepo_impl
24
+ * BC - Status (2002-03-08): InterfaceRepo_impl
25 25
  *
26 26
  * This is an implementation class, and not kept binary compatible. It's
27 27
  * only here since the REGISTER_IMPLEMENTATION bootstrapping may not yet

+ 1
- 1
mcop/iomanager.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08):
24
+ * BC - Status (2002-03-08):
25 25
  *   BINARY COMPATIBLE: IONotify, TimeNotify, IOManager
26 26
  *   NO BC FOR: StdIOManager
27 27
  *

+ 1
- 1
mcop/loopback.h View File

@@ -28,7 +28,7 @@
28 28
 #include "arts_export.h"
29 29
 
30 30
 /*
31
- * BC - tqStatus (2002-03-08): LoopbackConnection
31
+ * BC - Status (2002-03-08): LoopbackConnection
32 32
  *
33 33
  * Not part of the public API. Do NOT use it in your apps. No binary
34 34
  * compatibility guaranteed.

+ 1
- 1
mcop/mcopconfig.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): MCOPConfig
24
+ * BC - Status (2002-03-08): MCOPConfig
25 25
  *
26 26
  * Is guaranteed to stay binary compatible. d ptr provided.
27 27
  */

+ 108
- 103
mcop/mcoputils.cc View File

@@ -79,8 +79,8 @@ if ((result == -1) && (errno == ENOENT))
79 79
 static char *locate_mcop_dir()
80 80
 {
81 81
   struct passwd *pw_ent;
82
-  char kde_tmp_dir[PATH_MAX+1];
83
-  char user_tmp_dir[PATH_MAX+1];
82
+  string kde_tmp_dir;
83
+  string user_tmp_dir;
84 84
   int uid = getuid();
85 85
   const char *home_dir = getenv("HOME");
86 86
   const char *kde_home = uid ? getenv("KDEHOME") : getenv("KDEROOTHOME");
@@ -96,7 +96,7 @@ static char *locate_mcop_dir()
96 96
   if (!tmp || !tmp[0])
97 97
      tmp = "/tmp";
98 98
           
99
-  kde_tmp_dir[0] = 0;
99
+  kde_tmp_dir = "";
100 100
 
101 101
   pw_ent = getpwuid(uid);
102 102
   if (!pw_ent)
@@ -105,12 +105,7 @@ static char *locate_mcop_dir()
105 105
      return 0;
106 106
   }
107 107
 
108
-  strncpy(user_tmp_dir, tmp, PATH_MAX );
109
-  user_tmp_dir[ PATH_MAX ] = '\0';
110
-  strncat(user_tmp_dir, "/ksocket-", PATH_MAX - strlen(user_tmp_dir) );
111
-  user_tmp_dir[ PATH_MAX ] = '\0';
112
-  strncat(user_tmp_dir, pw_ent->pw_name, PATH_MAX - strlen(user_tmp_dir));
113
-  user_tmp_dir[ PATH_MAX ] = '\0';
108
+  user_tmp_dir = string(tmp) + "/ksocket-" + string(pw_ent->pw_name);
114 109
 
115 110
   if (!kde_home || !kde_home[0])
116 111
   {
@@ -127,44 +122,37 @@ static char *locate_mcop_dir()
127 122
      {
128 123
         arts_fatal("Aborting. $HOME not set!");
129 124
      }
130
-     if (strlen(home_dir) > (PATH_MAX-100))
131
-     {
132
-        arts_fatal("Aborting. Home directory path too long!");
133
-     }
134 125
      kde_home++;
135
-     strncpy(kde_tmp_dir, home_dir, PATH_MAX);
136
-     kde_tmp_dir[ PATH_MAX ] = '\0';
126
+     kde_tmp_dir = string(home_dir);
137 127
   }
138
-  strncat(kde_tmp_dir, kde_home, PATH_MAX - strlen(kde_tmp_dir));
128
+  kde_tmp_dir += kde_home;
139 129
 
140 130
   /** Strip trailing '/' **/
141
-  if ( kde_tmp_dir[strlen(kde_tmp_dir)-1] == '/')
142
-     kde_tmp_dir[strlen(kde_tmp_dir)-1] = 0;
131
+  if ( kde_tmp_dir[kde_tmp_dir.length()-1] == '/')
132
+     kde_tmp_dir.resize(kde_tmp_dir.length()-1);
143 133
 
144
-  result = stat(kde_tmp_dir, &stat_buf);
134
+  result = stat(kde_tmp_dir.c_str(), &stat_buf);
145 135
   if (result == -1)
146 136
   {
147 137
      return 0;
148 138
   }  
149 139
 
150
-  strncat(kde_tmp_dir, kde_prefix, PATH_MAX - strlen(kde_tmp_dir));
151
-  if (gethostname(kde_tmp_dir+strlen(kde_tmp_dir), PATH_MAX - strlen(kde_tmp_dir) - 1) != 0)
140
+  kde_tmp_dir += kde_prefix;
152 141
   {
153
-     arts_fatal("Aborting. Could not determine hostname or hostname too long.");
142
+     char buf[1024];
143
+     if (gethostname(buf, sizeof(buf)-1) != 0)
144
+     {
145
+        arts_fatal("Aborting. Could not determine hostname or hostname too long.");
146
+     }
147
+     buf[sizeof(buf)-1] = '\0';
148
+     kde_tmp_dir += buf;
154 149
   }
155
-  kde_tmp_dir[sizeof(kde_tmp_dir)-1] = '\0';
156 150
 
157
-  result = lstat(kde_tmp_dir, &stat_buf);
151
+  result = lstat(kde_tmp_dir.c_str(), &stat_buf);
158 152
   if ((result == 0) && (S_ISDIR(stat_buf.st_mode)))
159 153
   {
160 154
      /* $KDEHOME/socket-$HOSTNAME is a normal directory. Do nothing. */
161
-     tmp_buf = (char *) malloc(PATH_MAX+1);
162
-     if (!tmp_buf)
163
-        return 0;
164
-
165
-     strncpy(tmp_buf, kde_tmp_dir, PATH_MAX);
166
-     tmp_buf[ PATH_MAX ] = '\0';
167
-        
155
+     tmp_buf = strdup(kde_tmp_dir.c_str());
168 156
      return tmp_buf;
169 157
   }
170 158
   
@@ -175,26 +163,32 @@ static char *locate_mcop_dir()
175 163
   }
176 164
   if ((result == -1) || (!S_ISLNK(stat_buf.st_mode)))
177 165
   {
178
-     arts_warning("Error: \"%s\" is not a link or a directory.\n", kde_tmp_dir);
166
+     arts_warning("Error: \"%s\" is not a link or a directory.\n", kde_tmp_dir.c_str());
179 167
      return 0;
180 168
   }
181
-  tmp_buf = (char *) malloc(PATH_MAX+1);
182
-  if (!tmp_buf)
183
-     return 0;
184 169
 
185 170
   /* kde_tmp_dir is a link. Check whether it points to a valid directory. */
186
-  result = readlink(kde_tmp_dir, tmp_buf, PATH_MAX);
187
-  if (result == -1)
188
-  {
189
-     arts_warning("Error: \"%s\" could not be read.\n", kde_tmp_dir);
190
-     free(tmp_buf);
191
-     return 0;
192
-  }
171
+  ssize_t size = 2048;
172
+  tmp_buf = NULL;
173
+  do {
174
+     size *= 2;
175
+     tmp_buf = (char *) realloc(tmp_buf, size);
176
+     if (!tmp_buf)
177
+	return 0;
178
+     result = readlink(kde_tmp_dir.c_str(), tmp_buf, size - 1);
179
+     if (result == -1)
180
+     {
181
+	arts_warning("Error: \"%s\" could not be read.\n", kde_tmp_dir.c_str());
182
+	free(tmp_buf);
183
+	return 0;
184
+     }
185
+  } while(result == size - 1);
193 186
   tmp_buf[result] = '\0';  
187
+
194 188
 //  printf("Link points to \"%s\"\n", tmp_buf);
195
-  if (strncmp(tmp_buf, user_tmp_dir, strlen(user_tmp_dir)) != 0)
189
+  if (strncmp(tmp_buf, user_tmp_dir.c_str(), user_tmp_dir.length()) != 0)
196 190
   {
197
-     arts_warning("Error: \"%s\" points to \"%s\" instead of \"%s\".\n", kde_tmp_dir, tmp_buf, user_tmp_dir);
191
+     arts_warning("Error: \"%s\" points to \"%s\" instead of \"%s\".\n", kde_tmp_dir.c_str(), tmp_buf, user_tmp_dir.c_str());
198 192
      free(tmp_buf);
199 193
      return 0;
200 194
   }
@@ -229,19 +223,19 @@ int create_link(const char *file, const char *tmp_dir)
229 223
 
230 224
 
231 225
 static
232
-int build_link(const char *tmp_prefix, const char *kde_prefix)
226
+int build_link(string tmp_prefix, const char *kde_prefix)
233 227
 {
234 228
   struct passwd *pw_ent;
235
-  char kde_tmp_dir[PATH_MAX+1];
236
-  char user_tmp_dir[PATH_MAX+1];
237
-  char tmp_buf[PATH_MAX+1];
229
+  string kde_tmp_dir;
230
+  string user_tmp_dir;
231
+  char *tmp_buf;
238 232
   int uid = getuid();
239 233
   const char *home_dir = getenv("HOME");
240 234
   const char *kde_home = uid ? getenv("KDEHOME") : getenv("KDEROOTHOME");
241 235
   int result;
242 236
   struct stat stat_buf;
243 237
 
244
-  kde_tmp_dir[0] = 0;
238
+  kde_tmp_dir = "";
245 239
 
246 240
   pw_ent = getpwuid(uid);
247 241
   if (!pw_ent)
@@ -250,9 +244,7 @@ int build_link(const char *tmp_prefix, const char *kde_prefix)
250 244
      return 1;
251 245
   }
252 246
 
253
-  strncpy(user_tmp_dir, tmp_prefix, PATH_MAX);
254
-  user_tmp_dir[ PATH_MAX ] = '\0';
255
-  strncat(user_tmp_dir, pw_ent->pw_name, PATH_MAX - strlen(tmp_prefix));
247
+  user_tmp_dir = tmp_prefix + string(pw_ent->pw_name);
256 248
 
257 249
   if (!kde_home || !kde_home[0])
258 250
   {
@@ -270,89 +262,106 @@ int build_link(const char *tmp_prefix, const char *kde_prefix)
270 262
         fprintf(stderr, "Aborting. $HOME not set!");
271 263
         exit(255);
272 264
      }
273
-     if (strlen(home_dir) > (PATH_MAX-100))
274
-     {
275
-        fprintf(stderr, "Aborting. Home directory path too long!");
276
-        exit(255);
277
-     }
278 265
      kde_home++;
279
-     strncpy(kde_tmp_dir, home_dir, PATH_MAX);
280
-     kde_tmp_dir[ PATH_MAX ] = '\0';
266
+     kde_tmp_dir = string(home_dir);
281 267
   }
282
-  strncat(kde_tmp_dir, kde_home, PATH_MAX - strlen(kde_tmp_dir));
268
+  kde_tmp_dir += kde_home;
283 269
 
284 270
   /** Strip trailing '/' **/
285
-  if ( kde_tmp_dir[strlen(kde_tmp_dir)-1] == '/')
286
-     kde_tmp_dir[strlen(kde_tmp_dir)-1] = 0;
271
+  if ( kde_tmp_dir[kde_tmp_dir.length()-1] == '/')
272
+     kde_tmp_dir.resize(kde_tmp_dir.length()-1);
287 273
 
288
-  result = stat(kde_tmp_dir, &stat_buf);
274
+  result = stat(kde_tmp_dir.c_str(), &stat_buf);
289 275
   if ((result == -1) && (errno == ENOENT))
290 276
   {
291
-     result = mkdir(kde_tmp_dir, 0700);
277
+     result = mkdir(kde_tmp_dir.c_str(), 0700);
292 278
   }
293 279
   if (result == -1)
294 280
   {
295 281
      return 1;
296 282
   }
297 283
 
298
-  strncat(kde_tmp_dir, kde_prefix, PATH_MAX - strlen(kde_tmp_dir));
299
-  if (gethostname(kde_tmp_dir+strlen(kde_tmp_dir), PATH_MAX - strlen(kde_tmp_dir) - 1) != 0)
284
+  kde_tmp_dir += kde_prefix;
300 285
   {
301
-     perror("Aborting. Could not determine hostname: ");
302
-     exit(255);
286
+     char buf[1024];
287
+     if (gethostname(buf, sizeof(buf)-1) != 0)
288
+     {
289
+        arts_fatal("Aborting. Could not determine hostname or hostname too long.");
290
+     }
291
+     buf[sizeof(buf)-1] = '\0';
292
+     kde_tmp_dir += buf;
303 293
   }
304
-  kde_tmp_dir[sizeof(kde_tmp_dir)-1] = '\0';
305 294
 
306
-  result = lstat(kde_tmp_dir, &stat_buf);
295
+  result = lstat(kde_tmp_dir.c_str(), &stat_buf);
307 296
   if ((result == 0) && (S_ISDIR(stat_buf.st_mode)))
308 297
   {
309 298
      /* $KDEHOME/tmp is a normal directory. Do nothing. */
310
-     printf("Directory \"%s\" already exists.\n", kde_tmp_dir);
299
+     printf("Directory \"%s\" already exists.\n", kde_tmp_dir.c_str());
311 300
      return 0;
312 301
   }
313 302
   if ((result == -1) && (errno == ENOENT))
314 303
   {
315
-     printf("Creating link %s.\n", kde_tmp_dir);
316
-     result = create_link(kde_tmp_dir, user_tmp_dir);
304
+     printf("Creating link %s.\n", kde_tmp_dir.c_str());
305
+     result = create_link(kde_tmp_dir.c_str(), user_tmp_dir.c_str());
317 306
      if (result == 0) return 0; /* Success */
318
-     unlink(kde_tmp_dir);
319
-     strncat(user_tmp_dir, "XXXXXX", PATH_MAX - strlen(user_tmp_dir));
320
-     mktemp(user_tmp_dir); /* We want a directory, not a file, so using mkstemp makes no sense and is wrong */
321
-     return create_link(kde_tmp_dir, user_tmp_dir);
307
+     unlink(kde_tmp_dir.c_str());
308
+     user_tmp_dir += "XXXXXX";
309
+     tmp_buf = strdup(user_tmp_dir.c_str());
310
+     mktemp(tmp_buf); /* We want a directory, not a file, so using mkstemp makes no sense and is wrong */
311
+     result = create_link(kde_tmp_dir.c_str(), tmp_buf);
312
+     free(tmp_buf);
313
+     return result;
322 314
   }
323 315
   if ((result == -1) || (!S_ISLNK(stat_buf.st_mode)))
324 316
   {
325
-     fprintf(stderr, "Error: \"%s\" is not a link or a directory.\n", kde_tmp_dir);
317
+     fprintf(stderr, "Error: \"%s\" is not a link or a directory.\n", kde_tmp_dir.c_str());
326 318
      return 1;
327 319
   }
328 320
   /* kde_tmp_dir is a link. Check whether it points to a valid directory. */
329
-  result = readlink(kde_tmp_dir, tmp_buf, PATH_MAX);
330
-  if (result == -1)
331
-  {
332
-     fprintf(stderr, "Error: \"%s\" could not be read.\n", kde_tmp_dir);
333
-     return 1;
334
-  }
321
+  ssize_t size = 2048;
322
+  tmp_buf = NULL;
323
+  do {
324
+     size *= 2;
325
+     tmp_buf = (char *) realloc(tmp_buf, size);
326
+     if (!tmp_buf)
327
+	return 0;
328
+     result = readlink(kde_tmp_dir.c_str(), tmp_buf, size - 1);
329
+     if (result == -1)
330
+     {
331
+	arts_warning("Error: \"%s\" could not be read.\n", kde_tmp_dir.c_str());
332
+	free(tmp_buf);
333
+	return 0;
334
+     }
335
+  } while(result == size - 1);
335 336
   tmp_buf[result] = '\0';
337
+
336 338
   printf("Link points to \"%s\"\n", tmp_buf);
337
-  if (strncmp(tmp_buf, user_tmp_dir, strlen(user_tmp_dir)) != 0)
339
+  if (strncmp(tmp_buf, user_tmp_dir.c_str(), user_tmp_dir.length()) != 0)
338 340
   {
339
-     fprintf(stderr, "Error: \"%s\" points to \"%s\" instead of \"%s\".\n", kde_tmp_dir, tmp_buf, user_tmp_dir);
340
-     unlink(kde_tmp_dir);
341
-     printf("Creating link %s.\n", kde_tmp_dir);
342
-     result = create_link(kde_tmp_dir, user_tmp_dir);
341
+     fprintf(stderr, "Error: \"%s\" points to \"%s\" instead of \"%s\".\n", kde_tmp_dir.c_str(), tmp_buf, user_tmp_dir.c_str());
342
+     free(tmp_buf);
343
+     unlink(kde_tmp_dir.c_str());
344
+     printf("Creating link %s.\n", kde_tmp_dir.c_str());
345
+     result = create_link(kde_tmp_dir.c_str(), user_tmp_dir.c_str());
343 346
      if (result == 0) return 0; /* Success */
344
-     unlink(kde_tmp_dir);
345
-     strncat(user_tmp_dir, "XXXXXX", PATH_MAX - strlen(user_tmp_dir));
346
-     mktemp(user_tmp_dir); /* We want a directory, not a file, so using mkstemp makes no sense and is wrong */
347
-     return create_link(kde_tmp_dir, user_tmp_dir);
348
-     return 1;
347
+     unlink(kde_tmp_dir.c_str());
348
+     user_tmp_dir += "XXXXXX";
349
+     tmp_buf = strdup(user_tmp_dir.c_str());
350
+     mktemp(tmp_buf); /* We want a directory, not a file, so using mkstemp makes no sense and is wrong */
351
+     result = create_link(kde_tmp_dir.c_str(), tmp_buf);
352
+     free(tmp_buf);
353
+     return result;
349 354
   }
350 355
   result = check_tmp_dir(tmp_buf);
356
+  free(tmp_buf);
351 357
   if (result == 0) return 0; /* Success */
352
-  unlink(kde_tmp_dir);
353
-  strncat(user_tmp_dir, "XXXXXX", PATH_MAX - strlen(user_tmp_dir));
354
-  mktemp(user_tmp_dir); /* We want a directory, not a file, so using mkstemp makes no sense and is wrong */
355
-  return create_link(kde_tmp_dir, user_tmp_dir);
358
+  unlink(kde_tmp_dir.c_str());
359
+  user_tmp_dir += "XXXXXX";
360
+  tmp_buf = strdup(user_tmp_dir.c_str());
361
+  mktemp(tmp_buf); /* We want a directory, not a file, so using mkstemp makes no sense and is wrong */
362
+  result = create_link(kde_tmp_dir.c_str(), tmp_buf);
363
+  free(tmp_buf);
364
+  return result;
356 365
 }
357 366
 
358 367
 string MCOPUtils::createFilePath(string name)
@@ -372,11 +381,7 @@ string MCOPUtils::createFilePath(string name)
372 381
            if (!tmp || !tmp[0])
373 382
              tmp = "/tmp";
374 383
 
375
-           char tmp_prefix[PATH_MAX+1];
376
-           strcpy(tmp_prefix, tmp);
377
-           strcat(tmp_prefix, "/ksocket-");
378
-
379
-           build_link(tmp_prefix, "/socket-");
384
+           build_link(string(tmp) + "/ksocket-", "/socket-");
380 385
 	   mcop_dir = locate_mcop_dir();
381 386
 	}
382 387
 	if (!mcop_dir)

+ 1
- 1
mcop/mcoputils.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): MCOPUtils
24
+ * BC - Status (2002-03-08): MCOPUtils
25 25
  *
26 26
  * Collection class for all kinds of utility functions. BC, since never
27 27
  * instanciated.

+ 1
- 1
mcop/md5.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): arts_md5sum
24
+ * BC - Status (2002-03-08): arts_md5sum
25 25
  *
26 26
  * No binary compatibility guaranteed (part of Dispatcher's security model).
27 27
  */

+ 1
- 1
mcop/md5auth.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): arts_md5_*
24
+ * BC - Status (2002-03-08): arts_md5_*
25 25
  *
26 26
  * No guarantees - do not use.
27 27
  */

+ 1
- 1
mcop/namedstore.h View File

@@ -29,7 +29,7 @@
29 29
 #include "stdio.h"
30 30
 
31 31
 /*
32
- * BC - tqStatus (2002-03-08): NamedStore
32
+ * BC - Status (2002-03-08): NamedStore
33 33
  *
34 34
  * None of these classes is considered part of the public API. Do NOT use it
35 35
  * in your apps. These are part of the implementation of object.cc and not

+ 1
- 1
mcop/notification.h View File

@@ -29,7 +29,7 @@
29 29
 namespace Arts {
30 30
 
31 31
 /*
32
- * BC - tqStatus (2002-03-08): Notification, NotificationClient,
32
+ * BC - Status (2002-03-08): Notification, NotificationClient,
33 33
  *   NotificationManager
34 34
  *
35 35
  * All need to be kept BC, NotificationManager with usual d ptr.

+ 1
- 1
mcop/object.h View File

@@ -34,7 +34,7 @@
34 34
 #include "arts_export.h"
35 35
 
36 36
 /*
37
- * BC - tqStatus (2002-03-08): Object_base, Object_skel, Object_stub
37
+ * BC - Status (2002-03-08): Object_base, Object_skel, Object_stub
38 38
  *
39 39
  * All of them have to be kept binary compatible carefully, due to interaction
40 40
  * with generated code. There are d ptrs in _skel and _stub, NOT TO BE USED

+ 1
- 1
mcop/objectmanager.h View File

@@ -30,7 +30,7 @@
30 30
 #include "arts_export.h"
31 31
 
32 32
 /*
33
- * BC - tqStatus (2002-03-08): ObjectManager
33
+ * BC - Status (2002-03-08): ObjectManager
34 34
  *
35 35
  * Keep binary compatible (since accessible via ::the()), use d ptr when
36 36
  * changing it.

+ 1
- 1
mcop/pool.h View File

@@ -25,7 +25,7 @@
25 25
 
26 26
 
27 27
 /*
28
- * BC - tqStatus (2002-03-08): Pool<type>
28
+ * BC - Status (2002-03-08): Pool<type>
29 29
  *
30 30
  * Needs to be kept binary compatible by NOT TOUCHING. When you want something
31 31
  * else, write a fresh one (used as part of Arts::Dispatcher, thus changing

+ 1
- 1
mcop/reference.h View File

@@ -19,7 +19,7 @@
19 19
 */
20 20
 
21 21
 /*
22
- * BC - tqStatus (2002-03-08): Reference, SubClass, Object, DynamicCast.
22
+ * BC - Status (2002-03-08): Reference, SubClass, Object, DynamicCast.
23 23
  *
24 24
  * Part of the public API. Must be kept binary compatible by NOT TOUCHING
25 25
  * AT ALL. Interaction with generated and written code.

+ 1
- 1
mcop/referenceclean.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): ReferenceClean
24
+ * BC - Status (2002-03-08): ReferenceClean
25 25
  *
26 26
  * None of these classes is considered part of the public API. Do NOT use it
27 27
  * in your apps. Can be changed arbitrarily even non BC.

+ 1
- 1
mcop/socketconnection.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): SocketConnection
24
+ * BC - Status (2002-03-08): SocketConnection
25 25
  *
26 26
  * None of these classes is considered part of the public API. Do NOT use it
27 27
  * in your apps. No BC guaranteed.

+ 1
- 1
mcop/startupmanager.h View File

@@ -28,7 +28,7 @@
28 28
 #include <list>
29 29
 
30 30
 /*
31
- * BC - tqStatus (2002-03-08): StartupClass, StartupManager.
31
+ * BC - Status (2002-03-08): StartupClass, StartupManager.
32 32
  *
33 33
  * The class needs to be kept BC, as the startup system bases on inheritance
34 34
  * and virtual functions. Do not change.

+ 1
- 1
mcop/tcpconnection.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): TCPConnection
24
+ * BC - Status (2002-03-08): TCPConnection
25 25
  *
26 26
  * Not part of the public API. Do NOT use it in your apps. Binary incompatible
27 27
  * changes allowed.

+ 1
- 1
mcop/tcpserver.h View File

@@ -27,7 +27,7 @@
27 27
 #include "arts_export.h"
28 28
 #include "iomanager.h"
29 29
 /*
30
- * BC - tqStatus (2002-03-08): TCPServer
30
+ * BC - Status (2002-03-08): TCPServer
31 31
  *
32 32
  * Not part of the public API. Do NOT use it in your apps. Binary incompatible
33 33
  * changes allowed.

+ 1
- 1
mcop/thread.h View File

@@ -26,7 +26,7 @@
26 26
 #include "arts_export.h"
27 27
 
28 28
 /*
29
- * BC - tqStatus (2002-03-08): SystemThreads, Thread, Mutex, ThreadCondition,
29
+ * BC - Status (2002-03-08): SystemThreads, Thread, Mutex, ThreadCondition,
30 30
  * Semaphore
31 31
  *
32 32
  * These classes are kept binary compatible. As the threading implementation

+ 1
- 1
mcop/type.h View File

@@ -27,7 +27,7 @@
27 27
 #include "buffer.h"
28 28
 
29 29
 /*
30
- * BC - tqStatus (2002-03-08): Type
30
+ * BC - Status (2002-03-08): Type
31 31
  *
32 32
  * Keep binary compatible. DO NOT TOUCH, DO NOT CHANGE.
33 33
  */

+ 1
- 1
mcop/unixconnection.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): UnixConnection
24
+ * BC - Status (2002-03-08): UnixConnection
25 25
  *
26 26
  * Not part of the public API. Do NOT use it in your apps. Can change, even
27 27
  * binary incompatible.

+ 1
- 1
mcop/unixserver.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): UnixServer
24
+ * BC - Status (2002-03-08): UnixServer
25 25
  *
26 26
  * Not part of the public API. Do NOT use it in your apps. Can change, even
27 27
  * binary incompatible.

+ 1
- 1
mcop/weakreference.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): WeakReference(Base)
24
+ * BC - Status (2002-03-08): WeakReference(Base)
25 25
  *
26 26
  * Has to be kept binary compatible by not touching it. Add a new class if
27 27
  * you need something else.

+ 1
- 1
qtmcop/qiomanager.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): QIOManager.
24
+ * BC - Status (2002-03-08): QIOManager.
25 25
  *
26 26
  * QIOManager is kept binary compatible.
27 27
  */

+ 1
- 1
qtmcop/qiomanager_p.h View File

@@ -21,7 +21,7 @@
21 21
     */
22 22
 
23 23
 /*
24
- * BC - tqStatus (2002-03-08): QIOWatch, QTimeWatch.
24
+ * BC - Status (2002-03-08): QIOWatch, QTimeWatch.
25 25
  *
26 26
  * These classes provide implementation details and not meant to be used
27 27
  * in any way.

+ 4
- 3
soundserver/artsd.cc View File

@@ -296,9 +296,10 @@ int main(int argc, char **argv)
296 296
 
297 297
 	if(cfgForceStart && !AudioSubSystem::the()->check())
298 298
 	{
299
-		warnNullDevice  = "Error while initializing the sound driver:\n";
300
-		warnNullDevice += AudioSubSystem::the()->error();
301
-		warnNullDevice += "\n\nThe sound server will continue, using the null output device.";
299
+		//Don't show an error (this looks bad and may confuse users without sound cards), kmix makes it obvious if sound isn't working
300
+		//warnNullDevice  = "Error while initializing the sound driver:\n";
301
+		//warnNullDevice += AudioSubSystem::the()->error();
302
+		//warnNullDevice += "\n\nThe sound server will continue, using the null output device.";
302 303
 		
303 304
 		AudioSubSystem::the()->audioIO("null");
304 305
 	}

+ 12
- 6
soundserver/artsplay.cc View File

@@ -42,13 +42,19 @@ static string absolutePath(const string& path)
42 42
 {
43 43
 	if(path[0] == '/') return path;
44 44
 
45
-	char buffer[PATH_MAX];
46
-	getcwd(buffer,PATH_MAX);
45
+	int size = 4096;
47 46
 
48
-	if(buffer[strlen(buffer)-1] == '/')
49
-		return buffer + path;
50
-	else
51
-		return string(buffer) + '/' + path;
47
+	while (1) {
48
+		char buffer[size];
49
+		if (getcwd(buffer,size))
50
+		{
51
+			if(buffer[strlen(buffer)-1] == '/')
52
+				return buffer + path;
53
+			else
54
+				return string(buffer) + '/' + path;
55
+		}
56
+		size *= 2;
57
+	}
52 58
 }
53 59
 
54 60
 int main(int argc, char **argv)

Loading…
Cancel
Save